From: Hilko Bengen Date: Wed, 8 Feb 2023 13:24:35 +0000 (+0100) Subject: New upstream version 1.50.0 X-Git-Tag: archive/raspbian/1.52.3-1+rpi1^2^2^2^2~6^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=30cdac10f4ae27b2478e7b788107060b7421ddda;p=guestfs-tools.git New upstream version 1.50.0 --- diff --git a/.gitignore b/.gitignore index dc81a50..da2a026 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ Makefile.in /bash/virt-df /bash/virt-dib /bash/virt-diff +/bash/virt-drivers /bash/virt-edit /bash/virt-filesystems /bash/virt-format @@ -97,6 +98,8 @@ Makefile.in /dib/.depend /dib/output_format_*.mli /dib/virt-dib +/drivers/.depend +/drivers/virt-drivers /diff/virt-diff /edit/virt-edit /format/virt-format @@ -156,6 +159,7 @@ Makefile.in /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-static-bin /test-data/phony-guests/fedora.db /test-data/phony-guests/guests.xml /test-data/phony-guests/guests-all-good.xml diff --git a/Makefile.am b/Makefile.am index c45b162..311789e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ # guestfs tools -# Copyright (C) 2009-2021 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -40,6 +40,7 @@ SUBDIRS += common/mlprogress SUBDIRS += common/mlvisit SUBDIRS += common/mlxml SUBDIRS += common/mltools +SUBDIRS += common/mldrivers SUBDIRS += common/mlcustomize endif @@ -54,6 +55,7 @@ if HAVE_OCAML # used by other OCaml tools, so these must come first. SUBDIRS += customize SUBDIRS += builder builder/templates +SUBDIRS += drivers SUBDIRS += get-kernel SUBDIRS += resize SUBDIRS += sparsify @@ -119,7 +121,7 @@ po/POTFILES: configure.ac po/POTFILES-ml: configure.ac rm -f $@ $@-t cd $(srcdir); \ - find builder common/ml* customize dib get-kernel resize sparsify sysprep -name '*.ml' | \ + find builder common/ml* customize dib drivers get-kernel resize sparsify sysprep -name '*.ml' | \ grep -v '^builder/templates/' | \ grep -v '^common/mlv2v/' | \ grep -v -E '.*_tests\.ml$$' | \ diff --git a/Makefile.in b/Makefile.in index 8423558..c4aceb8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # guestfs tools -# Copyright (C) 2009-2021 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -129,12 +129,13 @@ host_triplet = @host@ @HAVE_OCAML_TRUE@ common/mlpcre @HAVE_OCAML_TRUE@am__append_2 = common/mlgettext common/mlprogress \ @HAVE_OCAML_TRUE@ common/mlvisit common/mlxml common/mltools \ -@HAVE_OCAML_TRUE@ common/mlcustomize +@HAVE_OCAML_TRUE@ common/mldrivers common/mlcustomize # OCaml tools. Note 'common/ml*' and 'customize' contain shared code # used by other OCaml tools, so these must come first. @HAVE_OCAML_TRUE@am__append_3 = customize builder builder/templates \ -@HAVE_OCAML_TRUE@ get-kernel resize sparsify sysprep dib +@HAVE_OCAML_TRUE@ drivers get-kernel resize sparsify sysprep \ +@HAVE_OCAML_TRUE@ dib # Perl tools. @HAVE_TOOLS_TRUE@am__append_4 = win-reg @@ -430,10 +431,11 @@ DIST_SUBDIRS = gnulib/lib common/utils common/structs \ common/mlstdutils common/mlutils common/mlpcre common/edit \ common/options common/parallel common/progress common/visit \ common/windows common/mlgettext common/mlprogress \ - 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 docs po po-docs + common/mlvisit common/mlxml common/mltools common/mldrivers \ + common/mlcustomize test-data align cat diff df edit format \ + inspector make-fs customize builder builder/templates drivers \ + get-kernel resize sparsify 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 \ @@ -529,7 +531,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -558,6 +559,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -628,6 +631,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -1483,7 +1487,7 @@ po/POTFILES: configure.ac po/POTFILES-ml: configure.ac rm -f $@ $@-t cd $(srcdir); \ - find builder common/ml* customize dib get-kernel resize sparsify sysprep -name '*.ml' | \ + find builder common/ml* customize dib drivers get-kernel resize sparsify sysprep -name '*.ml' | \ grep -v '^builder/templates/' | \ grep -v '^common/mlv2v/' | \ grep -v -E '.*_tests\.ml$$' | \ diff --git a/README b/README index 3f9e45d..47a4783 100644 --- a/README +++ b/README @@ -7,7 +7,7 @@ For discussion, development, patches, etc. please use the mailing list: http://www.redhat.com/mailman/listinfo/libguestfs -Copyright (C) 2009-2021 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. The programs are distributed under the GPLv2+. Some parts are LGPLv2+ licensed. See individual files for license details, and COPYING and diff --git a/aclocal.m4 b/aclocal.m4 index e7fd337..7add24f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -20,8 +20,8 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# gettext.m4 serial 75 (gettext-0.21.1) -dnl Copyright (C) 1995-2014, 2016, 2018-2021 Free Software Foundation, Inc. +# gettext.m4 serial 72 (gettext-0.21.1) +dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -42,13 +42,11 @@ dnl Bruno Haible , 2000-2006, 2008-2010. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -dnl INTLSYMBOL must be one of 'external', 'use-libtool', 'here'. -dnl INTLSYMBOL should be 'external' for packages other than GNU gettext. -dnl It should be 'use-libtool' for the packages 'gettext-runtime' and -dnl 'gettext-tools'. -dnl It should be 'here' for the package 'gettext-runtime/intl'. -dnl If INTLSYMBOL is 'here', then a libtool library -dnl $(top_builddir)/libintl.la will be created (shared and/or static, +dnl INTLSYMBOL must be one of 'external', 'use-libtool'. +dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and +dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext @@ -79,21 +77,24 @@ dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. - m4_if([$1], [], , [m4_if([$1], [external], , [m4_if([$1], [use-libtool], , [m4_if([$1], [here], , + m4_if([$1], [], , [m4_if([$1], [external], , [m4_if([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT -])])])])]) +])])])]) m4_if(m4_if([$1], [], [old])[]m4_if([$1], [no-libtool], [old]), [old], [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported. ])]) m4_if([$2], [], , [m4_if([$2], [need-ngettext], , [m4_if([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) - define([gt_building_libintl_in_same_build_tree], - m4_if([$1], [use-libtool], [yes], [m4_if([$1], [here], [yes], [no])])) + define([gt_included_intl], + m4_if([$1], [external], [no], [yes])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) AC_REQUIRE([AM_PO_SUBDIRS])dnl + m4_if(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) @@ -103,13 +104,13 @@ AC_DEFUN([AM_GNU_GETTEXT], dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then - dnl tests. But if configure.ac invokes AM_ICONV after AM_GNU_GETTEXT + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it. - m4_if(gt_building_libintl_in_same_build_tree, yes, , [ + m4_if(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) @@ -119,7 +120,8 @@ AC_DEFUN([AM_GNU_GETTEXT], dnl Set USE_NLS. AC_REQUIRE([AM_NLS]) - m4_if(gt_building_libintl_in_same_build_tree, yes, [ + m4_if(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= @@ -138,7 +140,7 @@ AC_DEFUN([AM_GNU_GETTEXT], dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no - m4_if(gt_building_libintl_in_same_build_tree, yes, [ + m4_if(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], @@ -194,7 +196,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then dnl Sometimes libintl requires libiconv, so first search for libiconv. - m4_if(gt_building_libintl_in_same_build_tree, yes, , [ + m4_if(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL @@ -272,8 +274,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools \ - && test "$PACKAGE" != libintl; }; then + && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. @@ -282,7 +283,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION INCINTL= fi - m4_if(gt_building_libintl_in_same_build_tree, yes, [ + m4_if(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. @@ -292,6 +293,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. + BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD" LTLIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD" @@ -361,17 +363,20 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION POSUB=po fi - m4_if(gt_building_libintl_in_same_build_tree, yes, [ + m4_if(gt_included_intl, yes, [ + dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes' + dnl because some of the testsuite requires it. + BUILD_INCLUDED_LIBINTL=yes + dnl Make all variables we use known to autoconf. + AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) ]) - m4_if(gt_building_libintl_in_same_build_tree, yes, [], [ - dnl For backward compatibility. Some Makefiles may be using this. - INTLLIBS="$LIBINTL" - AC_SUBST([INTLLIBS]) - ]) + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST([INTLLIBS]) dnl Make all documented variables known to autoconf. AC_SUBST([LIBINTL]) @@ -1600,7 +1605,7 @@ fi AC_LIB_PROG_LD_GNU ]) -# lib-link.m4 serial 32 +# lib-link.m4 serial 33 dnl Copyright (C) 2001-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -1798,8 +1803,8 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY], eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) AC_ARG_WITH(PACK[-prefix], -[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], +[[ --with-]]PACK[[-prefix[=DIR] search for ]]PACKLIBS[[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]]PACKLIBS[[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no @@ -3116,7 +3121,7 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], ])dnl PKG_HAVE_DEFINE_WITH_MODULES # po.m4 serial 32 (gettext-0.21.1) -dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc. +dnl Copyright (C) 1995-2014, 2016, 2018-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/align/Makefile.in b/align/Makefile.in index 3ca655c..3ea557d 100644 --- a/align/Makefile.in +++ b/align/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -493,7 +493,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -522,6 +521,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -592,6 +593,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/bash/Makefile.am b/bash/Makefile.am index 4e5a20e..000fab5 100644 --- a/bash/Makefile.am +++ b/bash/Makefile.am @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2013-2020 Red Hat Inc. +# Copyright (C) 2013-2023 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 @@ -29,6 +29,7 @@ symlinks = \ virt-diff \ virt-df \ virt-dib \ + virt-drivers \ virt-edit \ virt-filesystems \ virt-format \ @@ -54,7 +55,7 @@ CLEANFILES += \ # common options like -d is handled by this common script. However # this script cannot deal with commands that use --ro/--rw # (eg. virt-rescue). Those tools have to be handled individually. -virt-builder virt-cat virt-customize virt-df virt-dib virt-diff \ +virt-builder virt-cat virt-customize virt-df virt-dib virt-diff virt-drivers \ virt-edit virt-filesystems virt-format virt-get-kernel virt-inspector \ virt-log virt-ls \ virt-resize virt-sparsify virt-sysprep \ diff --git a/bash/Makefile.in b/bash/Makefile.in index bdbf903..2a15273 100644 --- a/bash/Makefile.in +++ b/bash/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs -# Copyright (C) 2013-2020 Red Hat Inc. +# Copyright (C) 2013-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -424,7 +424,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -453,6 +452,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -523,6 +524,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -676,6 +678,7 @@ symlinks = \ virt-diff \ virt-df \ virt-dib \ + virt-drivers \ virt-edit \ virt-filesystems \ virt-format \ @@ -1133,7 +1136,7 @@ export TEST_FUNCTIONS := \ # common options like -d is handled by this common script. However # this script cannot deal with commands that use --ro/--rw # (eg. virt-rescue). Those tools have to be handled individually. -virt-builder virt-cat virt-customize virt-df virt-dib virt-diff \ +virt-builder virt-cat virt-customize virt-df virt-dib virt-diff virt-drivers \ virt-edit virt-filesystems virt-format virt-get-kernel virt-inspector \ virt-log virt-ls \ virt-resize virt-sparsify virt-sysprep \ diff --git a/bash/virt-alignment-scan b/bash/virt-alignment-scan index 17d883d..b93a001 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-2021 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -127,6 +127,12 @@ _virt_diff () } && complete -o default -F _virt_diff virt-diff +_virt_drivers () +{ + _guestfs_virttools "virt-drivers" 1 +} && +complete -o default -F _virt_drivers virt-drivers + _virt_edit () { _guestfs_virttools "virt-edit" 0 diff --git a/bash/virt-win-reg b/bash/virt-win-reg index dce91bb..1d1d60c 100644 --- a/bash/virt-win-reg +++ b/bash/virt-win-reg @@ -1,5 +1,5 @@ # libguestfs-test-tool bash completion script -*- shell-script -*- -# Copyright (C) 2014-2020 Red Hat Inc. +# Copyright (C) 2014-2023 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 diff --git a/bugs-in-changelog.sh b/bugs-in-changelog.sh index 52430e5..2428c3f 100755 --- a/bugs-in-changelog.sh +++ b/bugs-in-changelog.sh @@ -1,6 +1,6 @@ #!/bin/bash - # bugs-in-changelog.sh -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/build-aux/compile b/build-aux/compile index df363c8..23fcba0 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff --git a/build-aux/config.guess b/build-aux/config.guess index 7ea49fa..b33c9e8 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,8 +1,8 @@ -#!/usr/bin/sh +#! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2016-10-02' +timestamp='2018-08-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2016-10-02' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -27,7 +27,7 @@ timestamp='2016-10-02' # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . @@ -39,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -50,7 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,8 +84,6 @@ if test $# != 0; then exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,39 @@ trap 'exit 1' 1 2 15 # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 +trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -132,14 +135,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in +case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu - eval $set_cc_for_build - cat <<-EOF > $dummy.c + set_cc_for_build + cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc @@ -149,13 +152,20 @@ Linux|GNU|GNU/*) LIBC=gnu #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi ;; esac # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -169,30 +179,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - /sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` - machine=${arch}${endian}-unknown + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -208,10 +218,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Determine ABI tags. - case "${UNAME_MACHINE_ARCH}" in + case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -219,46 +229,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) - echo ${UNAME_MACHINE}-unknown-sortix + echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -310,28 +329,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -343,7 +353,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos @@ -370,38 +380,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -410,25 +415,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -439,44 +444,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -485,23 +490,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -527,17 +532,17 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -554,7 +559,7 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -566,14 +571,14 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -584,7 +589,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -598,7 +603,7 @@ EOF exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -607,18 +612,18 @@ EOF IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -633,28 +638,28 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in + case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in + case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -687,13 +692,13 @@ EOF exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = hppa2.0w ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -712,15 +717,15 @@ EOF HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -745,11 +750,11 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -758,7 +763,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -766,9 +771,9 @@ EOF exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -793,127 +798,120 @@ EOF echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" + exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -927,63 +925,63 @@ EOF esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + set_cc_for_build + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -997,70 +995,70 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-${LIBC} + echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-${LIBC} + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-${LIBC} + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-${LIBC} + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-${LIBC} + echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-${LIBC} + echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-${LIBC} + echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1074,34 +1072,34 @@ EOF # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1111,12 +1109,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1126,9 +1124,9 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1148,9 +1146,9 @@ EOF exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1170,9 +1168,9 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1181,28 +1179,28 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1213,7 +1211,7 @@ EOF *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1233,23 +1231,23 @@ EOF exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1268,49 +1266,56 @@ EOF echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux${UNAME_RELEASE} + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build + set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub @@ -1321,7 +1326,7 @@ EOF # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` @@ -1329,19 +1334,25 @@ EOF UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + echo nse-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1350,18 +1361,19 @@ EOF echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. + # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1382,14 +1394,14 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1398,32 +1410,44 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'` + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; esac +echo "$0: unable to guess system type" >&2 + +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 <&2 </dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/build-aux/config.sub b/build-aux/config.sub index ba15a57..b51fb8c 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -1,8 +1,8 @@ -#!/usr/bin/sh +#! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2016 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2016-09-05' +timestamp='2018-08-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ timestamp='2016-09-05' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -33,7 +33,7 @@ timestamp='2016-09-05' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -67,7 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright 1992-2016 Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -94,7 +94,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -110,1242 +110,1159 @@ case $# in exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac +# Split fields of configuration type +IFS="-" read -r field1 field2 field3 field4 <&2 + exit 1 ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + *-*-*-*) + basic_machine=$field1-$field2 + os=$field3-$field4 ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \ + | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + os=linux-android + ;; + *) + basic_machine=$field1-$field2 + os=$field3 + ;; + esac ;; - -psos*) - os=-psos + *-*) + # A lone config we happen to match not fitting any patern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | we32k \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + op50n) + cpu=hppa1.1 + vendor=oki ;; - ms1) - basic_machine=mt-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown + ibm*) + cpu=i370 + vendor=ibm ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none + orion105) + cpu=clipper + vendor=highlevel ;; - xscaleeb) - basic_machine=armeb-unknown + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; - - xscaleel) - basic_machine=armel-unknown + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux + cpu=we32k + vendor=att ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec + cpu=powerpc + vendor=ibm + os=cnk ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - os=$os"spe" + cpu=m68k + vendor=motorola ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd + dpx2*) + cpu=m68k + vendor=bull + os=sysv3 ;; encore | umax | mmax) - basic_machine=ns32k-encore + cpu=ns32k + vendor=encore ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 + cpu=ns32k + vendor=ns ;; h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm + cpu=hppa1.0 + vendor=hp ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} ;; iris | iris4d) - basic_machine=mips-sgi + cpu=mips + vendor=sgi case $os in - -irix*) + irix*) ;; *) - os=-irix4 + os=irix4 ;; esac ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs + cpu=m68000 + vendor=convergent ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint ;; news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv + cpu=mips + vendor=sony + os=newsos ;; - next | m*-next ) - basic_machine=m68k-next + next | m*-next) + cpu=m68k + vendor=next case $os in - -nextstep* ) + nextstep* ) ;; - -ns2*) - os=-nextstep2 + ns2*) + os=nextstep2 ;; *) - os=-nextstep3 + os=nextstep3 ;; esac ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem + cpu=np1 + vendor=gould ;; op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k + cpu=hppa1.1 + vendor=oki + os=proelf ;; pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=tti ;; pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + cpu=m68k + vendor=tti ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + pc532) + cpu=ns32k + vendor=pc532 ;; pn) - basic_machine=pn-gould + cpu=pn + vendor=gould ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + power) + cpu=power + vendor=ibm ;; ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos | rdos64) - basic_machine=x86_64-pc - os=-rdos - ;; - rdos32) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff + cpu=i386 + vendor=ibm ;; rm[46]00) - basic_machine=mips-siemens + cpu=mips + vendor=siemens ;; rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm + cpu=romp + vendor=ibm ;; - sa29200) - basic_machine=a29k-amd - os=-udi + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} ;; - sb1) - basic_machine=mipsisa64sb1-unknown + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown + tower | tower-32) + cpu=m68k + vendor=ncr ;; - sde) - basic_machine=mipsisa32-sde - os=-elf + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - sei) - basic_machine=mips-sei - os=-seiux + w65) + cpu=w65 + vendor=wdc ;; - sequent) - basic_machine=i386-sequent + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf ;; - sh) - basic_machine=sh-hitachi - os=-hms + none) + cpu=none + vendor=none ;; - sh5el) - basic_machine=sh5le-unknown + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - sh64) - basic_machine=sh64-unknown + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks + + *-*) + IFS="-" read -r cpu vendor <&2 - exit 1 + # Recognize the cannonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | romp | rs6000 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | wasm32 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1353,200 +1270,246 @@ esac # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if [ x$os != x ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + # First match some system type aliases that might get confused + # with valid system types. + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux ;; - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` + bluegene*) + os=cnk ;; - -solaris) - os=-solaris2 + solaris1 | solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - -svr4*) - os=-sysv4 + solaris) + os=solaris2 ;; - -unixware*) - os=-sysv4.2uw + unixware*) + os=sysv4.2uw ;; - -gnu/linux*) + gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # es1800 is here to avoid being matched by es* (a different OS) + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos + ;; + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix*) + # Each alternative MUST end in a * to match a version number. + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) + qnx*) + case $cpu in + x86 | i*86) ;; *) - os=-nto$os + os=nto-$os ;; esac ;; - -nto-qnx*) + hiux*) + os=hiuxwe2 ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` + nto-qnx*) ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) ;; - -linux-dietlibc) - os=-linux-dietlibc + linux-dietlibc) + os=linux-dietlibc ;; - -linux*) + linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + lynx*178) + os=lynxos178 ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + lynx*5) + os=lynxos5 ;; - -opened*) - os=-openedition + lynx*) + os=lynxos ;; - -os400*) - os=-os400 + mac*) + os=`echo "$os" | sed -e 's|mac|macos|'` ;; - -wince*) - os=-wince + opened*) + os=openedition ;; - -osfrose*) - os=-osfrose + os400*) + os=os400 ;; - -osf*) - os=-osf + sunos5*) + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - -utek*) - os=-bsd + sunos6*) + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - -dynix*) - os=-bsd + wince*) + os=wince ;; - -acis*) - os=-aos + utek*) + os=bsd ;; - -atheos*) - os=-atheos + dynix*) + os=bsd ;; - -syllable*) - os=-syllable + acis*) + os=aos ;; - -386bsd) - os=-bsd + atheos*) + os=atheos ;; - -ctix* | -uts*) - os=-sysv + syllable*) + os=syllable ;; - -nova*) - os=-rtmk-nova + 386bsd) + os=bsd + ;; + ctix* | uts*) + os=sysv + ;; + nova*) + os=rtmk-nova ;; - -ns2 ) - os=-nextstep2 + ns2) + os=nextstep2 ;; - -nsk*) - os=-nsk + nsk*) + os=nsk ;; # Preserve the version number of sinix5. - -sinix5.*) + sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - -sinix*) - os=-sysv4 + sinix*) + os=sysv4 ;; - -tpf*) - os=-tpf + tpf*) + os=tpf ;; - -triton*) - os=-sysv3 + triton*) + os=sysv3 ;; - -oss*) - os=-sysv3 + oss*) + os=sysv3 ;; - -svr4) - os=-sysv4 + svr4*) + os=sysv4 ;; - -svr3) - os=-sysv3 + svr3) + os=sysv3 ;; - -sysvr4) - os=-sysv4 + sysvr4) + os=sysv4 ;; - # This must come after -sysvr4. - -sysv*) + # This must come after sysvr4. + sysv*) ;; - -ose*) - os=-ose + ose*) + os=ose ;; - -es1800*) - os=-ose + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint ;; - -xenix) - os=-xenix + zvmoe) + os=zvmoe ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + dicos*) + os=dicos ;; - -aros*) - os=-aros - ;; - -zvmoe) - os=-zvmoe + pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $cpu in + arm*) + os=eabi + ;; + *) + os=elf + ;; + esac ;; - -dicos*) - os=-dicos + nacl*) ;; - -nacl*) + ios) ;; - -ios) + none) ;; - -none) + *-eabi) ;; *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1562,261 +1525,265 @@ else # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + os=linux ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf + ;; + clipper-intergraph) + os=clix ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; - *-be) - os=-beos + pru-*) + os=elf ;; - *-haiku) - os=-haiku + *-be) + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; - *-next ) - os=-nextstep + *-next) + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor in + unknown) case $os in - -riscix*) + riscix*) vendor=acorn ;; - -sunos*) + sunos*) vendor=sun ;; - -cnk*|-aix*) + cnk*|-aix*) vendor=ibm ;; - -beos*) + beos*) vendor=be ;; - -hpux*) + hpux*) vendor=hp ;; - -mpeix*) + mpeix*) vendor=hp ;; - -hiux*) + hiux*) vendor=hitachi ;; - -unos*) + unos*) vendor=crds ;; - -dgux*) + dgux*) vendor=dg ;; - -luna*) + luna*) vendor=omron ;; - -genix*) + genix*) vendor=ns ;; - -mvs* | -opened*) + clix*) + vendor=intergraph + ;; + mvs* | opened*) vendor=ibm ;; - -os400*) + os400*) vendor=ibm ;; - -ptx*) + ptx*) vendor=sequent ;; - -tpf*) + tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - -aux*) + aux*) vendor=apple ;; - -hms*) + hms*) vendor=hitachi ;; - -mpw* | -macos*) + mpw* | macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - -vos*) + vos*) vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$cpu-$vendor-$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/build-aux/depcomp b/build-aux/depcomp index 715e343..6b39162 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, 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 diff --git a/build-aux/guestfs-test-driver b/build-aux/guestfs-test-driver index 3606ec0..10d27f2 100755 --- a/build-aux/guestfs-test-driver +++ b/build-aux/guestfs-test-driver @@ -3,7 +3,7 @@ scriptversion=2013-07-13.22; # UTC -# Copyright (C) 2011-2020 Free Software Foundation, Inc. +# Copyright (C) 2011-2023 Free Software Foundation, 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 diff --git a/build-aux/install-sh b/build-aux/install-sh index ec298b5..20d8b2e 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2020-11-14.01; # UTC +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,11 +69,6 @@ posix_mkdir= # Desired mode of installed file. mode=0755 -# Create dirs (including intermediate dirs) using mode 755. -# This is like GNU 'install' as of coreutils 8.32 (2020). -mkdir_umask=22 - -backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -104,28 +99,18 @@ Options: --version display version info and exit. -c (ignored) - -C install only if different (preserve data modification time) + -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. - -p pass -p to $cpprog. -s $stripprog installed files. - -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG - -By default, rm is invoked with -f; when overridden with RMPROG, -it's up to you to specify -f if you want it. - -If -S is not specified, no backups are attempted. - -Email bug reports to bug-automake@gnu.org. -Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -152,13 +137,8 @@ while test $# -ne 0; do -o) chowncmd="$chownprog $2" shift;; - -p) cpprog="$cpprog -p";; - -s) stripcmd=$stripprog;; - -S) backupsuffix="$2" - shift;; - -t) is_target_a_directory=always dst_arg=$2 @@ -275,10 +255,6 @@ do dstdir=$dst test -d "$dstdir" dstdir_status=$? - # Don't chown directories that already exist. - if test $dstdir_status = 0; then - chowncmd="" - fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -325,6 +301,22 @@ do if test $dstdir_status != 0; then case $posix_mkdir in '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -334,49 +326,52 @@ do fi posix_mkdir=false - # The $RANDOM variable is not portable (e.g., dash). Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap ' - ret=$? - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null - exit $ret - ' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p'. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if @@ -387,7 +382,7 @@ do then : else - # mkdir does not conform to POSIX, + # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -416,7 +411,7 @@ do prefixes= else if $posix_mkdir; then - (umask $mkdir_umask && + (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -493,13 +488,6 @@ do then rm -f "$dsttmp" else - # If $backupsuffix is set, and the file being installed - # already exists, attempt a backup. Don't worry if it fails, - # e.g., if mv doesn't support -f. - if test -n "$backupsuffix" && test -f "$dst"; then - $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null - fi - # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -514,9 +502,9 @@ do # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd "$dst" 2>/dev/null || + $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index 49fcad1..7f3523d 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -1,12 +1,12 @@ -#! /usr/bin/env sh +#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in -## by inline-source v2019-02-19.15 +## by inline-source v2014-01-03.01 -# libtool (GNU libtool) 2.4.7 +# libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. +# Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -31,8 +31,8 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.7 -package_revision=2.4.7 +VERSION=2.4.6 +package_revision=2.4.6 ## ------ ## @@ -64,25 +64,34 @@ package_revision=2.4.7 # libraries, which are installed to $pkgauxdir. # Set a version string for this script. -scriptversion=2019-02-19.15; # UTC +scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 -# This is free software. There is NO warranty; not even for -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Copyright (C) 2004-2019, 2021 Bootstrap Authors -# -# This file is dual licensed under the terms of the MIT license -# , and GPL version 2 or later -# . You must apply one of -# these licenses when using or redistributing this software or any of -# the files within it. See the URLs above, or the file `LICENSE` -# included in the Bootstrap distribution for the full license texts. +# Copyright (C) 2004-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +# 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 3 of the License, or +# (at your option) any later version. + +# As a special exception to the GNU General Public License, if you distribute +# this file as part of a program or library that is built using GNU Libtool, +# you may include this file under the same distribution terms that you use +# for the rest of that program. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNES 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, see . -# Please report bugs or propose patches to: -# +# Please report bugs or propose patches to gary@gnu.org. ## ------ ## @@ -130,12 +139,9 @@ do _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done -# These NLS vars are set unconditionally (bootstrap issue #24). Unset those -# in case the environment reset is needed later and the $save_* variant is not -# defined (see the code above). -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' @@ -153,26 +159,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# func_unset VAR -# -------------- -# Portably unset VAR. -# In some shells, an 'unset VAR' statement leaves a non-zero return -# status if VAR is already unset, which might be problematic if the -# statement is used at the end of a function (thus poisoning its return -# value) or when 'set -e' is active (causing even a spurious abort of -# the script in this case). -func_unset () -{ - { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } -} - - -# Make sure CDPATH doesn't cause `cd` commands to output the target dir. -func_unset CDPATH - -# Make sure ${,E,F}GREP behave sanely. -func_unset GREP_OPTIONS - ## ------------------------- ## ## Locate command utilities. ## @@ -273,7 +259,7 @@ test -z "$SED" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" + func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } @@ -309,7 +295,7 @@ test -z "$GREP" && { rm -f conftest.in conftest.tmp conftest.nl conftest.out } - func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" + func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } @@ -374,35 +360,6 @@ sed_double_backslash="\ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" -# require_check_ifs_backslash -# --------------------------- -# Check if we can use backslash as IFS='\' separator, and set -# $check_ifs_backshlash_broken to ':' or 'false'. -require_check_ifs_backslash=func_require_check_ifs_backslash -func_require_check_ifs_backslash () -{ - _G_save_IFS=$IFS - IFS='\' - _G_check_ifs_backshlash='a\\b' - for _G_i in $_G_check_ifs_backshlash - do - case $_G_i in - a) - check_ifs_backshlash_broken=false - ;; - '') - break - ;; - *) - check_ifs_backshlash_broken=: - break - ;; - esac - done - IFS=$_G_save_IFS - require_check_ifs_backslash=: -} - ## ----------------- ## ## Global variables. ## @@ -623,16 +580,16 @@ if test yes = "$_G_HAVE_PLUSEQ_OP"; then { $debug_cmd - func_quote_arg pretty "$2" - eval "$1+=\\ \$func_quote_arg_result" + func_quote_for_eval "$2" + eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd - func_quote_arg pretty "$2" - eval "$1=\$$1\\ \$func_quote_arg_result" + func_quote_for_eval "$2" + eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi @@ -1134,203 +1091,85 @@ func_relative_path () } -# func_quote_portable EVAL ARG -# ---------------------------- -# Internal function to portably implement func_quote_arg. Note that we still -# keep attention to performance here so we as much as possible try to avoid -# calling sed binary (so far O(N) complexity as long as func_append is O(1)). -func_quote_portable () +# func_quote_for_eval ARG... +# -------------------------- +# Aesthetically quote ARGs to be evaled later. +# This function returns two values: +# i) func_quote_for_eval_result +# double-quoted, suitable for a subsequent eval +# ii) func_quote_for_eval_unquoted_result +# has all characters that are still active within double +# quotes backslashified. +func_quote_for_eval () { $debug_cmd - $require_check_ifs_backslash - - func_quote_portable_result=$2 - - # one-time-loop (easy break) - while true - do - if $1; then - func_quote_portable_result=`$ECHO "$2" | $SED \ - -e "$sed_double_quote_subst" -e "$sed_double_backslash"` - break - fi - - # Quote for eval. - case $func_quote_portable_result in + func_quote_for_eval_unquoted_result= + func_quote_for_eval_result= + while test 0 -lt $#; do + case $1 in *[\\\`\"\$]*) - # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string - # contains the shell wildcard characters. - case $check_ifs_backshlash_broken$func_quote_portable_result in - :*|*[\[\*\?]*) - func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ - | $SED "$sed_quote_subst"` - break - ;; - esac + _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; + *) + _G_unquoted_arg=$1 ;; + esac + if test -n "$func_quote_for_eval_unquoted_result"; then + func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" + else + func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" + fi - func_quote_portable_old_IFS=$IFS - for _G_char in '\' '`' '"' '$' - do - # STATE($1) PREV($2) SEPARATOR($3) - set start "" "" - func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy - IFS=$_G_char - for _G_part in $func_quote_portable_result - do - case $1 in - quote) - func_append func_quote_portable_result "$3$2" - set quote "$_G_part" "\\$_G_char" - ;; - start) - set first "" "" - func_quote_portable_result= - ;; - first) - set quote "$_G_part" "" - ;; - esac - done - done - IFS=$func_quote_portable_old_IFS + case $_G_unquoted_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting, command substitution and variable expansion + # for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_quoted_arg=\"$_G_unquoted_arg\" ;; - *) ;; + *) + _G_quoted_arg=$_G_unquoted_arg + ;; esac - break - done - func_quote_portable_unquoted_result=$func_quote_portable_result - case $func_quote_portable_result in - # double-quote args containing shell metacharacters to delay - # word splitting, command substitution and variable expansion - # for a subsequent eval. - # many bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_portable_result=\"$func_quote_portable_result\" - ;; - esac + if test -n "$func_quote_for_eval_result"; then + func_append func_quote_for_eval_result " $_G_quoted_arg" + else + func_append func_quote_for_eval_result "$_G_quoted_arg" + fi + shift + done } -# func_quotefast_eval ARG -# ----------------------- -# Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', -# but optimized for speed. Result is stored in $func_quotefast_eval. -if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then - printf -v _GL_test_printf_tilde %q '~' - if test '\~' = "$_GL_test_printf_tilde"; then - func_quotefast_eval () - { - printf -v func_quotefast_eval_result %q "$1" - } - else - # Broken older Bash implementations. Make those faster too if possible. - func_quotefast_eval () - { - case $1 in - '~'*) - func_quote_portable false "$1" - func_quotefast_eval_result=$func_quote_portable_result - ;; - *) - printf -v func_quotefast_eval_result %q "$1" - ;; - esac - } - fi -else - func_quotefast_eval () - { - func_quote_portable false "$1" - func_quotefast_eval_result=$func_quote_portable_result - } -fi - +# func_quote_for_expand ARG +# ------------------------- +# Aesthetically quote ARG to be evaled later; same as above, +# but do not quote variable references. +func_quote_for_expand () +{ + $debug_cmd -# func_quote_arg MODEs ARG -# ------------------------ -# Quote one ARG to be evaled later. MODEs argument may contain zero or more -# specifiers listed below separated by ',' character. This function returns two -# values: -# i) func_quote_arg_result -# double-quoted (when needed), suitable for a subsequent eval -# ii) func_quote_arg_unquoted_result -# has all characters that are still active within double -# quotes backslashified. Available only if 'unquoted' is specified. -# -# Available modes: -# ---------------- -# 'eval' (default) -# - escape shell special characters -# 'expand' -# - the same as 'eval'; but do not quote variable references -# 'pretty' -# - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might -# be used later in func_quote to get output like: 'echo "a b"' instead -# of 'echo a\ b'. This is slower than default on some shells. -# 'unquoted' -# - produce also $func_quote_arg_unquoted_result which does not contain -# wrapping double-quotes. -# -# Examples for 'func_quote_arg pretty,unquoted string': -# -# string | *_result | *_unquoted_result -# ------------+-----------------------+------------------- -# " | \" | \" -# a b | "a b" | a b -# "a b" | "\"a b\"" | \"a b\" -# * | "*" | * -# z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" -# -# Examples for 'func_quote_arg pretty,unquoted,expand string': -# -# string | *_result | *_unquoted_result -# --------------+---------------------+-------------------- -# z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" -func_quote_arg () -{ - _G_quote_expand=false - case ,$1, in - *,expand,*) - _G_quote_expand=: - ;; + case $1 in + *[\\\`\"]*) + _G_arg=`$ECHO "$1" | $SED \ + -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; + *) + _G_arg=$1 ;; esac - case ,$1, in - *,pretty,*|*,expand,*|*,unquoted,*) - func_quote_portable $_G_quote_expand "$2" - func_quote_arg_result=$func_quote_portable_result - func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result - ;; - *) - # Faster quote-for-eval for some shells. - func_quotefast_eval "$2" - func_quote_arg_result=$func_quotefast_eval_result + case $_G_arg in + # Double-quote args containing shell metacharacters to delay + # word splitting and command substitution for a subsequent eval. + # Many Bourne shells cannot handle close brackets correctly + # in scan sets, so we specify it separately. + *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") + _G_arg=\"$_G_arg\" ;; esac -} - -# func_quote MODEs ARGs... -# ------------------------ -# Quote all ARGs to be evaled later and join them into single command. See -# func_quote_arg's description for more info. -func_quote () -{ - $debug_cmd - _G_func_quote_mode=$1 ; shift - func_quote_result= - while test 0 -lt $#; do - func_quote_arg "$_G_func_quote_mode" "$1" - if test -n "$func_quote_result"; then - func_append func_quote_result " $func_quote_arg_result" - else - func_append func_quote_result "$func_quote_arg_result" - fi - shift - done + func_quote_for_expand_result=$_G_arg } @@ -1376,8 +1215,8 @@ func_show_eval () _G_cmd=$1 _G_fail_exp=${2-':'} - func_quote_arg pretty,expand "$_G_cmd" - eval "func_notquiet $func_quote_arg_result" + func_quote_for_expand "$_G_cmd" + eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" @@ -1402,8 +1241,8 @@ func_show_eval_locale () _G_fail_exp=${2-':'} $opt_quiet || { - func_quote_arg expand,pretty "$_G_cmd" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$_G_cmd" + eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { @@ -1530,26 +1369,30 @@ func_lt_ver () # End: #! /bin/sh +# Set a version string for this script. +scriptversion=2014-01-07.03; # UTC + # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 -# This is free software. There is NO warranty; not even for -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Copyright (C) 2010-2019, 2021 Bootstrap Authors -# -# This file is dual licensed under the terms of the MIT license -# , and GPL version 2 or later -# . You must apply one of -# these licenses when using or redistributing this software or any of -# the files within it. See the URLs above, or the file `LICENSE` -# included in the Bootstrap distribution for the full license texts. +# Copyright (C) 2010-2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# Please report bugs or propose patches to: -# +# 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 3 of the License, or +# (at your option) any later version. -# Set a version string for this script. -scriptversion=2019-02-19.15; # UTC +# 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, see . + +# Please report bugs or propose patches to gary@gnu.org. ## ------ ## @@ -1572,7 +1415,7 @@ scriptversion=2019-02-19.15; # UTC # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file -# starting with '# Written by ' and ending with '# Copyright'. +# starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the @@ -1584,7 +1427,7 @@ scriptversion=2019-02-19.15; # UTC # to display verbose messages only when your user has specified # '--verbose'. # -# After sourcing this file, you can plug in processing for additional +# After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. @@ -1633,8 +1476,8 @@ fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## # This section contains functions for adding, removing, and running hooks -# in the main code. A hook is just a list of function names that can be -# run in order later on. +# to the main code. A hook is just a named list of of function, that can +# be run in order later on. # func_hookable FUNC_NAME # ----------------------- @@ -1667,8 +1510,7 @@ func_add_hook () # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ -# Remove HOOK_FUNC from the list of hook functions to be called by -# FUNC_NAME. +# Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd @@ -1677,28 +1519,10 @@ func_remove_hook () } -# func_propagate_result FUNC_NAME_A FUNC_NAME_B -# --------------------------------------------- -# If the *_result variable of FUNC_NAME_A _is set_, assign its value to -# *_result variable of FUNC_NAME_B. -func_propagate_result () -{ - $debug_cmd - - func_propagate_result_result=: - if eval "test \"\${${1}_result+set}\" = set" - then - eval "${2}_result=\$${1}_result" - else - func_propagate_result_result=false - fi -} - - # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. -# It's assumed that the list of hook functions contains nothing more +# It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. @@ -1708,19 +1532,22 @@ func_run_hooks () case " $hookable_fns " in *" $1 "*) ;; - *) func_fatal_error "'$1' does not support hook functions." ;; + *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - func_unset "${_G_hook}_result" - eval $_G_hook '${1+"$@"}' - func_propagate_result $_G_hook func_run_hooks - if $func_propagate_result_result; then - eval set dummy "$func_run_hooks_result"; shift - fi + eval $_G_hook '"$@"' + + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift done + + func_quote_for_eval ${1+"$@"} + func_run_hooks_result=$func_quote_for_eval_result } @@ -1730,18 +1557,10 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list from your hook function. You may remove -# or edit any options that you action, and then pass back the remaining -# unprocessed options in '_result', escaped -# suitably for 'eval'. -# -# The '_result' variable is automatically unset -# before your hook gets called; for best performance, only set the -# *_result variable when necessary (i.e. don't call the 'func_quote' -# function unnecessarily because it can be an expensive operation on some -# machines). -# -# Like this: +# full positional parameter list in your hook function, remove any +# options that you action, and then pass back the remaining unprocessed +# options in '_result', escaped suitably for +# 'eval'. Like this: # # my_options_prep () # { @@ -1751,8 +1570,9 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# # No change in '$@' (ignored completely by this hook). Leave -# # my_options_prep_result variable intact. +# +# func_quote_for_eval ${1+"$@"} +# my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # @@ -1761,36 +1581,25 @@ func_run_hooks () # { # $debug_cmd # -# args_changed=false -# -# # Note that, for efficiency, we parse as many options as we can +# # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: -# args_changed=: -# ;; +# --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift -# args_changed=: # ;; -# *) # Make sure the first unrecognised option "$_G_opt" -# # is added back to "$@" in case we need it later, -# # if $args_changed was set to 'true'. -# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; +# *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # -# # Only call 'func_quote' here if we processed at least one argument. -# if $args_changed; then -# func_quote eval ${1+"$@"} -# my_silent_option_result=$func_quote_result -# fi +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # @@ -1801,26 +1610,17 @@ func_run_hooks () # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." +# +# func_quote_for_eval ${1+"$@"} +# my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # -# You'll also need to manually amend $usage_message to reflect the extra +# You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. -# func_options_finish [ARG]... -# ---------------------------- -# Finishing the option parse loop (call 'func_options' hooks ATM). -func_options_finish () -{ - $debug_cmd - - func_run_hooks func_options ${1+"$@"} - func_propagate_result func_run_hooks func_options_finish -} - - # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1830,27 +1630,17 @@ func_options () { $debug_cmd - _G_options_quoted=false + func_options_prep ${1+"$@"} + eval func_parse_options \ + ${func_options_prep_result+"$func_options_prep_result"} + eval func_validate_options \ + ${func_parse_options_result+"$func_parse_options_result"} - for my_func in options_prep parse_options validate_options options_finish - do - func_unset func_${my_func}_result - func_unset func_run_hooks_result - eval func_$my_func '${1+"$@"}' - func_propagate_result func_$my_func func_options - if $func_propagate_result_result; then - eval set dummy "$func_options_result"; shift - _G_options_quoted=: - fi - done + eval func_run_hooks func_options \ + ${func_validate_options_result+"$func_validate_options_result"} - $_G_options_quoted || { - # As we (func_options) are top-level options-parser function and - # nobody quoted "$@" for us yet, we need to do it explicitly for - # caller. - func_quote eval ${1+"$@"} - func_options_result=$func_quote_result - } + # save modified positional parameters for caller + func_options_result=$func_run_hooks_result } @@ -1859,8 +1649,9 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propagate that back to rest of this script, then the complete -# modified list must be put in 'func_run_hooks_result' before returning. +# needs to propogate that back to rest of this script, then the complete +# modified list must be put in 'func_run_hooks_result' before +# returning. func_hookable func_options_prep func_options_prep () { @@ -1871,7 +1662,9 @@ func_options_prep () opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} - func_propagate_result func_run_hooks func_options_prep + + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result } @@ -1883,32 +1676,25 @@ func_parse_options () { $debug_cmd - _G_parse_options_requote=false + func_parse_options_result= + # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} - func_propagate_result func_run_hooks func_parse_options - if $func_propagate_result_result; then - eval set dummy "$func_parse_options_result"; shift - # Even though we may have changed "$@", we passed the "$@" array - # down into the hook and it quoted it for us (because we are in - # this if-branch). No need to quote it again. - _G_parse_options_requote=false - fi + + # Adjust func_parse_options positional parameters to match + eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break - # We expect that one of the options parsed in this function matches - # and thus we remove _G_opt from "$@" and need to re-quote. - _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' - func_echo "enabling shell trace mode" >&2 + func_echo "enabling shell trace mode" $debug_cmd ;; @@ -1918,10 +1704,7 @@ func_parse_options () ;; --warnings|--warning|-W) - if test $# = 0 && func_missing_arg $_G_opt; then - _G_parse_options_requote=: - break - fi + test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1974,24 +1757,15 @@ func_parse_options () shift ;; - --) _G_parse_options_requote=: ; break ;; + --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift - _G_match_parse_options=false - break - ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - - if $_G_match_parse_options; then - _G_parse_options_requote=: - fi done - if $_G_parse_options_requote; then - # save modified positional parameters for caller - func_quote eval ${1+"$@"} - func_parse_options_result=$func_quote_result - fi + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result } @@ -2008,10 +1782,12 @@ func_validate_options () test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} - func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE + + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result } @@ -2067,8 +1843,8 @@ func_missing_arg () # func_split_equals STRING # ------------------------ -# Set func_split_equals_lhs and func_split_equals_rhs shell variables -# after splitting STRING at the '=' sign. +# Set func_split_equals_lhs and func_split_equals_rhs shell variables after +# splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ @@ -2083,9 +1859,8 @@ then func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} - if test "x$func_split_equals_lhs" = "x$1"; then - func_split_equals_rhs= - fi + test "x$func_split_equals_lhs" = "x$1" \ + && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. @@ -2095,7 +1870,7 @@ else func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= - test "x$func_split_equals_lhs=" = "x$1" \ + test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals @@ -2121,7 +1896,7 @@ else { $debug_cmd - func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` + func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt @@ -2163,44 +1938,31 @@ func_usage_message () # func_version # ------------ # Echo version message to standard output and exit. -# The version message is extracted from the calling file's header -# comments, with leading '# ' stripped: -# 1. First display the progname and version -# 2. Followed by the header comment line matching /^# Written by / -# 3. Then a blank line followed by the first following line matching -# /^# Copyright / -# 4. Immediately followed by any lines between the previous matches, -# except lines preceding the intervening completely blank line. -# For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' - /^# Written by /!b - s|^# ||; p; n - - :fwd2blnk - /./ { - n - b fwd2blnk + /(C)/!b go + :more + /\./!{ + N + s|\n# | | + b more } - p; n - - :holdwrnt - s|^# || - s|^# *$|| - /^Copyright /!{ - /./H - n - b holdwrnt + :go + /^# Written by /,/# warranty; / { + s|^# || + s|^# *$|| + s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| + p } - - s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| - G - s|\(\n\)\n*|\1|g - p; q' < "$progpath" + /^# Written by / { + s|^# || + p + } + /^warranty; /q' < "$progpath" exit $? } @@ -2210,12 +1972,12 @@ func_version () # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" +# time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. -scriptversion='(GNU libtool) 2.4.7' +scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... @@ -2306,7 +2068,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname (GNU libtool) 2.4.7 + version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2508,8 +2270,6 @@ libtool_options_prep () nonopt= preserve_args= - _G_rc_lt_options_prep=: - # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2533,16 +2293,11 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; - *) - _G_rc_lt_options_prep=false - ;; esac - if $_G_rc_lt_options_prep; then - # Pass back the list of options. - func_quote eval ${1+"$@"} - libtool_options_prep_result=$func_quote_result - fi + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep @@ -2554,12 +2309,9 @@ libtool_parse_options () { $debug_cmd - _G_rc_lt_parse_options=false - # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do - _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2634,20 +2386,15 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"} ; shift - _G_match_lt_parse_options=false - break - ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac - $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done - if $_G_rc_lt_parse_options; then - # save modified positional parameters for caller - func_quote eval ${1+"$@"} - libtool_parse_options_result=$func_quote_result - fi + + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options @@ -2668,10 +2415,17 @@ libtool_validate_options () # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" - # Keeping compiler generated duplicates in $postdeps and $predeps is not - # harmful, and is necessary in a majority of systems that use it to satisfy - # symbol dependencies. - opt_duplicate_compiler_generated_deps=: + case $host in + # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 + # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 + *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) + # don't eliminate duplications in $postdeps and $predeps + opt_duplicate_compiler_generated_deps=: + ;; + *) + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps + ;; + esac $opt_help || { # Sanity checks first: @@ -2697,8 +2451,8 @@ libtool_validate_options () } # Pass back the unparsed argument list - func_quote eval ${1+"$@"} - libtool_validate_options_result=$func_quote_result + func_quote_for_eval ${1+"$@"} + libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options @@ -3664,8 +3418,8 @@ func_mode_compile () esac done - func_quote_arg pretty "$libobj" - test "X$libobj" != "X$func_quote_arg_result" \ + func_quote_for_eval "$libobj" + test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" @@ -3738,8 +3492,8 @@ compiler." func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result - func_quote_arg pretty "$srcfile" - qsrcfile=$func_quote_arg_result + func_quote_for_eval "$srcfile" + qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then @@ -3894,8 +3648,7 @@ This mode accepts the following additional options: -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking - -Wc,FLAG - -Xcompiler FLAG pass FLAG directly to the compiler + -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. @@ -4001,8 +3754,6 @@ The following components of LINK-COMMAND are treated specially: -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wa,FLAG - -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) @@ -4345,8 +4096,8 @@ func_mode_install () case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. - func_quote_arg pretty "$nonopt" - install_prog="$func_quote_arg_result " + func_quote_for_eval "$nonopt" + install_prog="$func_quote_for_eval_result " arg=$1 shift else @@ -4356,8 +4107,8 @@ func_mode_install () # The real first argument should be the name of the installation program. # Aesthetically quote it. - func_quote_arg pretty "$arg" - func_append install_prog "$func_quote_arg_result" + func_quote_for_eval "$arg" + func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; @@ -4414,12 +4165,12 @@ func_mode_install () esac # Aesthetically quote the argument. - func_quote_arg pretty "$arg" - func_append install_prog " $func_quote_arg_result" + func_quote_for_eval "$arg" + func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then - func_quote_arg pretty "$arg2" + func_quote_for_eval "$arg2" fi - func_append install_shared_prog " $func_quote_arg_result" + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -4430,8 +4181,8 @@ func_mode_install () if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else - func_quote_arg pretty "$install_override_mode" - func_append install_shared_prog " -m $func_quote_arg_result" + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi @@ -4727,8 +4478,8 @@ func_mode_install () relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { - func_quote_arg expand,pretty "$relink_command" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$relink_command" + eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else @@ -5507,8 +5258,7 @@ else if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" - func_quote_arg pretty "$ECHO" - qECHO=$func_quote_arg_result + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. @@ -5518,7 +5268,7 @@ func_fallback_echo () \$1 _LTECHO_EOF' } - ECHO=$qECHO + ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to @@ -6861,9 +6611,9 @@ func_mode_link () while test "$#" -gt 0; do arg=$1 shift - func_quote_arg pretty,unquoted "$arg" - qarg=$func_quote_arg_unquoted_result - func_append libtool_args " $func_quote_arg_result" + func_quote_for_eval "$arg" + qarg=$func_quote_for_eval_unquoted_result + func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then @@ -7099,13 +6849,6 @@ func_mode_link () prev= continue ;; - xassembler) - func_append compiler_flags " -Xassembler $qarg" - prev= - func_append compile_command " -Xassembler $qarg" - func_append finalize_command " -Xassembler $qarg" - continue - ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" @@ -7276,7 +7019,7 @@ func_mode_link () # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; @@ -7296,7 +7039,7 @@ func_mode_link () esac elif test X-lc_r = "X$arg"; then case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; @@ -7326,20 +7069,8 @@ func_mode_link () prev=xcompiler continue ;; - # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. - -pthread) - case $host in - *solaris2*) ;; - *) - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - ;; - esac - continue - ;; - -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ + + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" @@ -7480,9 +7211,9 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_arg pretty "$flag" - func_append arg " $func_quote_arg_result" - func_append compiler_flags " $func_quote_arg_result" + func_quote_for_eval "$flag" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" @@ -7496,21 +7227,16 @@ func_mode_link () save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs - func_quote_arg pretty "$flag" - func_append arg " $wl$func_quote_arg_result" - func_append compiler_flags " $wl$func_quote_arg_result" - func_append linker_flags " $func_quote_arg_result" + func_quote_for_eval "$flag" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; - -Xassembler) - prev=xassembler - continue - ;; - -Xcompiler) prev=xcompiler continue @@ -7528,8 +7254,8 @@ func_mode_link () # -msg_* for osf cc -msg_*) - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: @@ -7548,15 +7274,12 @@ func_mode_link () # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang - # -fsanitize=* Clang/GCC memory and address sanitizer - # -fuse-ld=* Linker select flags for GCC - # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + -specs=*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" @@ -7577,15 +7300,15 @@ func_mode_link () continue else # Otherwise treat like 'Some other compiler flag' below - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result ;; *.$objext) @@ -7705,8 +7428,8 @@ func_mode_link () *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. - func_quote_arg pretty "$arg" - arg=$func_quote_arg_result + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result ;; esac # arg @@ -8911,7 +8634,7 @@ func_mode_link () test CXX = "$tagname" && { case $host_os in linux*) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi @@ -9084,7 +8807,7 @@ func_mode_link () # case $version_type in # correct linux to gnu/linux during the next big refactor - darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) + darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor @@ -9175,7 +8898,7 @@ func_mode_link () versuffix=.$current.$revision ;; - freebsd-elf | midnightbsd-elf) + freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision @@ -9401,7 +9124,7 @@ func_mode_link () *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) + *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -10212,8 +9935,8 @@ EOF for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { - func_quote_arg expand,pretty "$cmd" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10306,8 +10029,8 @@ EOF eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { - func_quote_arg expand,pretty "$cmd" - eval "func_echo $func_quote_arg_result" + func_quote_for_expand "$cmd" + eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? @@ -10781,13 +10504,12 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_arg pretty "$var_value" - relink_command="$var=$func_quote_arg_result; export $var; $relink_command" + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done - func_quote eval cd "`pwd`" - func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" - relink_command=$func_quote_arg_unquoted_result + relink_command="(cd `pwd`; $relink_command)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. @@ -11027,15 +10749,13 @@ EOF elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else - func_quote_arg pretty,unquoted "$var_value" - relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" + func_quote_for_eval "$var_value" + relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. - func_quote eval cd "`pwd`" - relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - func_quote_arg pretty,unquoted "$relink_command" - relink_command=$func_quote_arg_unquoted_result + relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi diff --git a/build-aux/missing b/build-aux/missing index 1fe1611..8d0eaad 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff --git a/build-aux/test-driver b/build-aux/test-driver index be73b80..89dba1e 100755 --- a/build-aux/test-driver +++ b/build-aux/test-driver @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2021 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, 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 @@ -42,13 +42,11 @@ print_usage () { cat <"$log_file" -"$@" >>"$log_file" 2>&1 +# Test script is run here. +"$@" >$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then @@ -131,7 +126,7 @@ esac # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). -echo "$res $test_name (exit status: $estatus)" >>"$log_file" +echo "$res $test_name (exit status: $estatus)" >>$log_file # Report outcome to console. echo "${col}${res}${std}: $test_name" diff --git a/build-aux/ylwrap b/build-aux/ylwrap index e8ec109..d153336 100755 --- a/build-aux/ylwrap +++ b/build-aux/ylwrap @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # Written by Tom Tromey . # diff --git a/builder/Makefile.am b/builder/Makefile.am index 7827442..42606aa 100644 --- a/builder/Makefile.am +++ b/builder/Makefile.am @@ -1,5 +1,5 @@ # libguestfs virt-builder tool -# Copyright (C) 2013-2020 Red Hat Inc. +# Copyright (C) 2013-2023 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 @@ -152,7 +152,8 @@ virt_builder_CFLAGS = \ $(LIBGUESTFS_CFLAGS) \ $(LIBLZMA_CFLAGS) \ $(LIBTINFO_CFLAGS) \ - $(LIBXML2_CFLAGS) + $(LIBXML2_CFLAGS) \ + $(LIBOSINFO_CFLAGS) BOBJECTS = $(SOURCES_ML:.ml=.cmo) XOBJECTS = $(BOBJECTS:.cmo=.cmx) @@ -204,6 +205,7 @@ OCAMLCLIBS = \ $(LIBGUESTFS_LIBS) \ $(LIBLZMA_LIBS) \ $(LIBXML2_LIBS) \ + $(LIBOSINFO_LIBS) \ $(JANSSON_LIBS) \ $(LIBINTL) \ -lgnu @@ -233,6 +235,7 @@ OCAMLLINKFLAGS = \ virt_builder_DEPENDENCIES = \ $(OBJECTS) \ ../common/mlpcre/mlpcre.$(MLARCHIVE) \ + ../common/mlxml/mlxml.$(MLARCHIVE) \ ../common/mlgettext/mlgettext.$(MLARCHIVE) \ ../common/mlstdutils/mlstdutils.$(MLARCHIVE) \ ../common/mlutils/mlcutils.$(MLARCHIVE) \ diff --git a/builder/Makefile.in b/builder/Makefile.in index 509c9d2..305a73b 100644 --- a/builder/Makefile.in +++ b/builder/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs virt-builder tool -# Copyright (C) 2013-2020 Red Hat Inc. +# Copyright (C) 2013-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -585,7 +585,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -614,6 +613,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -684,6 +685,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -955,7 +957,8 @@ noinst_DATA = $(am__append_5) \ @HAVE_OCAML_TRUE@ $(LIBGUESTFS_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBLZMA_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBTINFO_CFLAGS) \ -@HAVE_OCAML_TRUE@ $(LIBXML2_CFLAGS) +@HAVE_OCAML_TRUE@ $(LIBXML2_CFLAGS) \ +@HAVE_OCAML_TRUE@ $(LIBOSINFO_CFLAGS) @HAVE_OCAML_TRUE@BOBJECTS = $(SOURCES_ML:.ml=.cmo) @HAVE_OCAML_TRUE@XOBJECTS = $(BOBJECTS:.cmo=.cmx) @@ -999,6 +1002,7 @@ noinst_DATA = $(am__append_5) \ @HAVE_OCAML_TRUE@ $(LIBGUESTFS_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBLZMA_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ +@HAVE_OCAML_TRUE@ $(LIBOSINFO_LIBS) \ @HAVE_OCAML_TRUE@ $(JANSSON_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBINTL) \ @HAVE_OCAML_TRUE@ -lgnu @@ -1023,6 +1027,7 @@ noinst_DATA = $(am__append_5) \ @HAVE_OCAML_TRUE@virt_builder_DEPENDENCIES = \ @HAVE_OCAML_TRUE@ $(OBJECTS) \ @HAVE_OCAML_TRUE@ ../common/mlpcre/mlpcre.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ ../common/mlxml/mlxml.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ ../common/mlgettext/mlgettext.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ ../common/mlstdutils/mlstdutils.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ ../common/mlutils/mlcutils.$(MLARCHIVE) \ diff --git a/builder/builder.ml b/builder/builder.ml index 2c9c830..727aa8b 100644 --- a/builder/builder.ml +++ b/builder/builder.ml @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 @@ -97,7 +97,8 @@ let selected_cli_item cmdline index = name = arg && cmdline.arch = normalize_arch (Index.string_of_arch a) ) index with Not_found -> - error (f_"cannot find os-version ‘%s’ with architecture ‘%s’.\nUse --list to list available guest types.") + error (f_"cannot find os-version ‘%s’ with architecture ‘%s’.\n\ + Use --list to list available guest types.") arg cmdline.arch in item @@ -152,7 +153,13 @@ let main () = if cmdline.check_signature then ( let cmd = sprintf "%s --help >/dev/null 2>&1" cmdline.gpg in if cmdline.gpg = "" || shell_command cmd <> 0 then - error (f_"no GNU Privacy Guard (GnuPG, gpg) binary was found.\n\nEither gpg v1 or v2 can be installed to check signatures. Virt-builder looks for a binary called either ‘gpg2’ or ‘gpg‘ on the $PATH. You can also specify a binary using the ‘--gpg’ option. If you don't want to check signatures, use ’--no-check-signature’ but note that this may make you vulnerable to Man-In-The-Middle attacks.") + error (f_"no GNU Privacy Guard (GnuPG, gpg) binary was found.\n\n\ + Either gpg v1 or v2 can be installed to check signatures. \ + Virt-builder looks for a binary called either ‘gpg2’ or \ + ‘gpg‘ on the $PATH. You can also specify a binary using \ + the ‘--gpg’ option. If you don't want to check signatures, \ + use ’--no-check-signature’ but note that this may make you \ + vulnerable to Man-In-The-Middle attacks.") ); (* Check that curl works. *) @@ -182,7 +189,7 @@ let main () = * create. *) let tmpdir = Mkdtemp.temp_dir "virt-builder." in - On_exit.rmdir tmpdir; + On_exit.rm_rf tmpdir; (* Download the sources. *) let downloader = Downloader.create ~curl:cmdline.curl ~cache ~tmpdir in @@ -291,7 +298,11 @@ let main () = (match cmdline.output with | Some device when is_partition device -> if cmdline.warn_if_partition then - warning (f_"output device (%s) is a partition. If you are writing to a USB key or external drive then you probably need to write to the whole device, not to a partition. If this warning is wrong then you can disable it with --no-warn-if-partition") + warning (f_"output device (%s) is a partition. If you are writing \ + to a USB key or external drive then you probably need \ + to write to the whole device, not to a partition. If \ + this warning is wrong then you can disable it with \ + --no-warn-if-partition") device; | Some _ | None -> () ); @@ -316,10 +327,17 @@ let main () = (match Checksums.verify_checksums csums template with | Checksums.Good_checksum -> () | Checksums.Mismatched_checksum (csum, csum_actual) -> - error (f_"%s checksum of template did not match the expected checksum!\n found checksum: %s\n expected checksum: %s\nTry:\n - Use the ‘-v’ option and look for earlier error messages.\n - Delete the cache: virt-builder --delete-cache\n - Check no one has tampered with the website or your network!") - (Checksums.string_of_csum_t csum) csum_actual (Checksums.string_of_csum csum) + error (f_"%s checksum of template did not match the expected \ + checksum!\n found checksum: %s\n expected checksum: %s\n\ + Try:\n - Use the ‘-v’ option and look for earlier error \ + messages.\n - Delete the cache: \ + virt-builder --delete-cache\n - Check no one has tampered \ + with the website or your network!") + (Checksums.string_of_csum_t csum) csum_actual + (Checksums.string_of_csum csum) | Checksums.Missing_file -> - error (f_"%s: template not downloaded or deleted. You may have run ‘virt-builder --delete-cache’ in parallel.") + error (f_"%s: template not downloaded or deleted. You may have \ + run ‘virt-builder --delete-cache’ in parallel.") template ) @@ -391,10 +409,14 @@ let main () = | None -> blockdev_size in if size < original_image_size then - error (f_"images cannot be shrunk, the output size is too small for this image. Requested size = %s, minimum size = %s") + error (f_"images cannot be shrunk, the output size is too small \ + for this image. Requested size = %s, minimum size = %s") (human_size size) (human_size original_image_size) - else if output_is_block_dev && output_format = "raw" && size > blockdev_size then - error (f_"output size is too large for this block device. Requested size = %s, output block device = %s, output block device size = %s") + else if output_is_block_dev && + output_format = "raw" && size > blockdev_size then + error (f_"output size is too large for this block device. Requested \ + size = %s, output block device = %s, output \ + block device size = %s") (human_size size) output_filename (human_size blockdev_size); size in @@ -558,7 +580,10 @@ let main () = match plan ~max_depth:5 transitions itags ~must ~must_not with | Some plan -> plan | None -> - error (f_"no plan could be found for making a disk image with\nthe required size, format etc. This is a bug in libguestfs!\nPlease file a bug, giving the command line arguments you used.") in + error (f_"no plan could be found for making a disk image with\n\ + the required size, format etc. \ + This is a bug in libguestfs!\nPlease file a bug, giving \ + the command line arguments you used.") in (* Print out the plan. *) if verbose () then ( @@ -642,7 +667,8 @@ let main () = let { Index.expand; lvexpand } = entry in message (f_"Resizing (using virt-resize) to expand the disk to %s") (human_size osize); - let preallocation = if oformat = "qcow2" then Some "metadata" else None in + let preallocation = + if oformat = "qcow2" then Some "metadata" else None in let () = let g = open_guestfs () in g#disk_create ?preallocation ofile oformat osize in @@ -666,7 +692,8 @@ let main () = let ofile = List.assoc `Filename otags in let osize = Int64.of_string (List.assoc `Size otags) in let osize = roundup64 osize 512L in - message (f_"Resizing container (but not filesystems) to expand the disk to %s") + message (f_"Resizing container (but not filesystems) to \ + expand the disk to %s") (human_size osize); let cmd = sprintf "qemu-img resize %s %Ld%s" (quote ofile) osize (if verbose () then "" else " >/dev/null") in @@ -720,7 +747,9 @@ let main () = inspect_mount_root g root; root | _ -> - error (f_"no guest operating systems or multiboot OS found in this disk image\nThis is a failure of the source repository. Use -v for more information.") + error (f_"no guest operating systems or multiboot OS \ + found in this disk image\nThis is a failure \ + of the source repository. Use -v for more information.") in Customize_run.run g root cmdline.customize_ops; diff --git a/builder/cache.ml b/builder/cache.ml index c39f5fd..c3ad5c8 100644 --- a/builder/cache.ml +++ b/builder/cache.ml @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 diff --git a/builder/cache.mli b/builder/cache.mli index 12faf8b..9c8f6d9 100644 --- a/builder/cache.mli +++ b/builder/cache.mli @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 diff --git a/builder/cmdline.ml b/builder/cmdline.ml index 491059a..6ed338d 100644 --- a/builder/cmdline.ml +++ b/builder/cmdline.ml @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 @@ -190,7 +190,8 @@ A short summary of the options is given below. For detailed help please read the man page virt-builder(1). ") prog in - let opthandle = create_standard_options argspec ~anon_fun ~machine_readable:true usage_msg in + let opthandle = create_standard_options argspec + ~anon_fun ~machine_readable:true usage_msg in Getopt.parse opthandle.getopt; (* Dereference options. *) @@ -236,7 +237,8 @@ read the man page virt-builder(1). (match args with | [arg] -> arg | [] -> - error (f_"virt-builder os-version\nMissing ‘os-version’. Use ‘--list’ to list available template names.") + error (f_"virt-builder os-version\nMissing ‘os-version’. \ + Use ‘--list’ to list available template names.") | _ -> error (f_"too many parameters, expecting ‘os-version’") ) @@ -247,13 +249,15 @@ read the man page virt-builder(1). | [arg] -> arg | [] -> "" | _ -> - error (f_"too many parameters, at most one ‘os-version’ is allowed for --list") + error (f_"too many parameters, at most one ‘os-version’ \ + is allowed for --list") ) | `Notes -> (match args with | [arg] -> arg | [] -> - error (f_"virt-builder --notes os-version\nMissing ‘os-version’. Use ‘--list’ to list available template names.") + error (f_"virt-builder --notes os-version\nMissing ‘os-version’. \ + Use ‘--list’ to list available template names.") | _ -> error (f_"--notes: too many parameters, expecting ‘os-version’"); ) @@ -263,13 +267,15 @@ read the man page virt-builder(1). (match args with | [] -> "" | _ -> - error (f_"--cache-all-templates/--print-cache/--delete-cache does not need any extra arguments") + error (f_"--cache-all-templates/--print-cache/--delete-cache \ + does not need any extra arguments") ) | `Get_kernel -> (match args with | [arg] -> arg | [] -> - error (f_"virt-builder --get-kernel image\nMissing ‘image’ (disk image file) argument") + error (f_"virt-builder --get-kernel image\nMissing ‘image’ \ + (disk image file) argument") | _ -> error (f_"--get-kernel: too many parameters") ) in diff --git a/builder/cmdline.mli b/builder/cmdline.mli index 70990ed..d7402c3 100644 --- a/builder/cmdline.mli +++ b/builder/cmdline.mli @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 diff --git a/builder/downloader.ml b/builder/downloader.ml index 5a55a49..184c298 100644 --- a/builder/downloader.ml +++ b/builder/downloader.ml @@ -114,7 +114,8 @@ and download_to t ?(progress_bar = false) ~proxy uri filename = let lines = Curl.run curl_h in if List.length lines < 1 then - error (f_"unexpected output from curl command, enable debug and look at previous messages"); + error (f_"unexpected output from curl command, \ + enable debug and look at previous messages"); let status_code = List.hd lines in let bad_status_code = function | "" -> true diff --git a/builder/index.ml b/builder/index.ml index 3036555..03680f0 100644 --- a/builder/index.ml +++ b/builder/index.ml @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 diff --git a/builder/index.mli b/builder/index.mli index e0b4063..1716b4d 100644 --- a/builder/index.mli +++ b/builder/index.mli @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 diff --git a/builder/index_parser.ml b/builder/index_parser.ml index 59fa509..b4cb81e 100644 --- a/builder/index_parser.ml +++ b/builder/index_parser.ml @@ -25,9 +25,12 @@ open Utils open Printf open Unix -let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } = +let get_index ~downloader ~sigchecker ?(template = false) + { Sources.uri; proxy } = let corrupt_file () = - error (f_"The index file downloaded from ‘%s’ is corrupt.\nYou need to ask the supplier of this file to fix it and upload a fixed version.") uri + error (f_"The index file downloaded from ‘%s’ is corrupt.\n\ + You need to ask the supplier of this file to fix it \ + and upload a fixed version.") uri in let rec get_index () = @@ -57,7 +60,9 @@ let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } fun (n, arch) -> let id = n, arch in if Hashtbl.mem nseen id then ( - eprintf (f_"%s: index is corrupt: os-version ‘%s’ with architecture ‘%s’ appears two or more times\n") prog n arch; + eprintf (f_"%s: index is corrupt: os-version ‘%s’ with \ + architecture ‘%s’ appears two or more times\n") + prog n arch; corrupt_file () ); Hashtbl.add nseen id true @@ -73,9 +78,11 @@ let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } if Hashtbl.mem fseen hashkey then ( (match subkey with | Some value -> - eprintf (f_"%s: index is corrupt: %s: field ‘%s[%s]’ appears two or more times\n") prog n field value + eprintf (f_"%s: index is corrupt: %s: field ‘%s[%s]’ appears \ + two or more times\n") prog n field value | None -> - eprintf (f_"%s: index is corrupt: %s: field ‘%s’ appears two or more times\n") prog n field); + eprintf (f_"%s: index is corrupt: %s: field ‘%s’ appears \ + two or more times\n") prog n field); corrupt_file () ); Hashtbl.add fseen hashkey true @@ -88,9 +95,11 @@ let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } fun (n, fields) -> let fields = List.map (fun (k, sk, v) -> (k, sk), v) fields in let printable_name = - try Some (List.assoc ("name", None) fields) with Not_found -> None in + try Some (List.assoc ("name", None) fields) + with Not_found -> None in let osinfo = - try Some (List.assoc ("osinfo", None) fields) with Not_found -> None in + try Some (List.assoc ("osinfo", None) fields) + with Not_found -> None in let file_uri = try make_absolute_uri (List.assoc ("file", None) fields) with Not_found -> @@ -106,7 +115,8 @@ let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } let roots = g#inspect_os () in let nroots = Array.length roots in if nroots <> 1 then ( - eprintf (f_"%s: no ‘arch’ entry for %s and failed to guess it\n") prog n; + eprintf (f_"%s: no ‘arch’ entry for %s and failed to \ + guess it\n") prog n; corrupt_file () ); let inspected_arch = g#inspect_get_arch (Array.get roots 0) in @@ -132,7 +142,8 @@ let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } eprintf (f_"%s: cannot parse ‘revision’ field for ‘%s’\n") prog n; corrupt_file () in let format = - try Some (List.assoc ("format", None) fields) with Not_found -> None in + try Some (List.assoc ("format", None) fields) + with Not_found -> None in let size = let get_image_size filepath = (* If a compressed image manages to reach this code, qemu-img just @@ -142,7 +153,8 @@ let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } let infos = Utils.get_image_infos filepath in JSON_parser.object_get_number "virtual-size" infos | `XZ | `GZip | `Tar | ` Zip -> - eprintf (f_"%s: cannot determine the virtual size of %s due to compression") + eprintf (f_"%s: cannot determine the virtual size of %s \ + due to compression") prog filepath; corrupt_file () in @@ -163,7 +175,8 @@ let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } corrupt_file () ) in let compressed_size = - try Some (Int64.of_string (List.assoc ("compressed_size", None) fields)) + try Some (Int64.of_string (List.assoc ("compressed_size", None) + fields)) with | Not_found -> None @@ -172,9 +185,11 @@ let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } prog n; corrupt_file () in let expand = - try Some (List.assoc ("expand", None) fields) with Not_found -> None in + try Some (List.assoc ("expand", None) fields) + with Not_found -> None in let lvexpand = - try Some (List.assoc ("lvexpand", None) fields) with Not_found -> None in + try Some (List.assoc ("lvexpand", None) fields) + with Not_found -> None in let notes = let rec loop = function | [] -> [] @@ -247,7 +262,8 @@ let get_index ~downloader ~sigchecker ?(template = false) { Sources.uri; proxy } corrupt_file () ) else if path.[0] = '/' then ( - eprintf (f_"%s: you must use relative paths (not ‘%s’) in the index file\n") prog path; + eprintf (f_"%s: you must use relative paths (not ‘%s’) \ + in the index file\n") prog path; corrupt_file () ) else ( diff --git a/builder/index_parser_tests.ml b/builder/index_parser_tests.ml index 39983fa..daa88f4 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 - On_exit.rmdir tmpdir; + On_exit.rm_rf tmpdir; tmpdir let dummy_sigchecker = Sigchecker.create ~gpg:"gpg" @@ -58,7 +58,8 @@ let parse_file file = ~sigchecker:dummy_sigchecker source in List.map ( - fun (id, e) -> (id, { e with Index.file_uri = Filename.basename e.Index.file_uri }) + fun (id, e) -> (id, { e with Index.file_uri = + Filename.basename e.Index.file_uri }) ) entries let format_entries entries = @@ -88,7 +89,9 @@ let test_write_complete ctx = compressed_size = Some (Int64.of_int 12345); expand = Some "/dev/sda1"; lvexpand = Some "/some/lv"; - notes = [ ("", "Notes split\non several lines\n\n with starting space ") ]; + notes = [ ("", + "Notes split\non several lines\n\n with starting space ") + ]; hidden = false; aliases = Some ["alias1"; "alias2"]; sigchecker = dummy_sigchecker; diff --git a/builder/ini_reader.ml b/builder/ini_reader.ml index ba5b894..88ce07b 100644 --- a/builder/ini_reader.ml +++ b/builder/ini_reader.ml @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 @@ -30,7 +30,8 @@ and c_section = string * c_fields (* [name] + fields *) and c_fields = field array (* Calls yyparse in the C code. *) -external parse_index : prog:string -> error_suffix:string -> string -> c_sections = "virt_builder_parse_index" +external parse_index : prog:string -> error_suffix:string -> string -> + c_sections = "virt_builder_parse_index" let read_ini ?(error_suffix = "") file = let sections = parse_index ~prog ~error_suffix file in diff --git a/builder/ini_reader.mli b/builder/ini_reader.mli index 8a014d0..f5069a2 100644 --- a/builder/ini_reader.mli +++ b/builder/ini_reader.mli @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 diff --git a/builder/languages.ml b/builder/languages.ml index ab3ac92..baf032b 100644 --- a/builder/languages.ml +++ b/builder/languages.ml @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 @@ -20,7 +20,8 @@ open Std_utils open Tools_utils let re_locale = - PCRE.compile ~caseless:true "^([a-z]+)(_([a-z]+))?(\\.([a-z0-9-]+))?(@([a-z]+))?$" + PCRE.compile ~caseless:true + "^([a-z]+)(_([a-z]+))?(\\.([a-z0-9-]+))?(@([a-z]+))?$" let split_locale loc = let l = ref [] in diff --git a/builder/list_entries.ml b/builder/list_entries.ml index f1f6729..470d1b6 100644 --- a/builder/list_entries.ml +++ b/builder/list_entries.ml @@ -121,7 +121,8 @@ and list_entries_json ~sources index = let item = match compressed_size with | None -> item - | Some n -> ("compressed-size", JSON.String (Int64.to_string n)) :: item in + | Some n -> ("compressed-size", + JSON.String (Int64.to_string n)) :: item in let item = let json_notes = List.fold_right ( diff --git a/builder/paths.mli b/builder/paths.mli index f4897da..b0f076e 100644 --- a/builder/paths.mli +++ b/builder/paths.mli @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2014-2020 Red Hat Inc. + * Copyright (C) 2014-2023 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 diff --git a/builder/pxzcat.ml b/builder/pxzcat.ml index fcd5793..f73580b 100644 --- a/builder/pxzcat.ml +++ b/builder/pxzcat.ml @@ -17,4 +17,5 @@ *) 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 c5b6563..3a5714a 100644 --- a/builder/repository_main.ml +++ b/builder/repository_main.ml @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2016-2020 SUSE Inc. + * Copyright (C) 2016-2023 SUSE 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 @@ -68,7 +68,8 @@ A short summary of the options is given below. For detailed help please read the man page virt-builder-repository(1). ") prog in - let opthandle = create_standard_options argspec ~anon_fun ~machine_readable:true usage_msg in + let opthandle = create_standard_options argspec + ~anon_fun ~machine_readable:true usage_msg in Getopt.parse opthandle.getopt; (* Machine-readable mode? Print out some facts about what @@ -97,7 +98,8 @@ read the man page virt-builder-repository(1). Use ‘/path/to/repo’ to point to the repository folder.") | _ -> - error (f_"too many parameters, only one path to repository is allowed") in + error (f_"too many parameters, \ + only one path to repository is allowed") in { gpg = gpg; @@ -207,7 +209,7 @@ let process_image acc_entries filename repo tmprepo index interactive value in - let re_valid_id = PCRE.compile ~anchored:true "[-a-zA-Z0-9_.]+" in + let re_valid_id = PCRE.compile "^[-a-zA-Z0-9_.]+$" in let rec ask_id default = let id = ask (s_"Identifier: ") ~default in if not (PCRE.matches re_valid_id id) then ( @@ -217,7 +219,8 @@ let process_image acc_entries filename repo tmprepo index interactive id in let ask_arch guess = - let arches = [ "x86_64"; "aarch64"; "armv7l"; "i686"; "ppc64"; "ppc64le"; "s390x" ] in + let arches = [ "x86_64"; "aarch64"; "armv7l"; + "i686"; "ppc64"; "ppc64le"; "s390x" ] in Index.Arch (ask (s_"Architecture: ") ~default:guess ~values:arches) in @@ -225,7 +228,8 @@ let process_image acc_entries filename repo tmprepo index interactive let osinfo = ask (s_ "osinfo short ID: ") ~default in let osinfo_ids = osinfo_get_short_ids () in if not (StringSet.mem osinfo osinfo_ids) then - warning (f_"‘%s’ is not a recognized osinfo OS id; using it anyway") osinfo; + warning (f_"‘%s’ is not a recognized osinfo OS id; using it anyway") + osinfo; osinfo in let extract_entry_data ?entry () = @@ -237,7 +241,8 @@ let process_image acc_entries filename repo tmprepo index interactive let roots = g#inspect_os () in let nroots = Array.length roots in if nroots <> 1 then - error (f_"virt-builder template images must have one and only one root file system, found %d") + error (f_"virt-builder template images must have \ + one and only one root file system, found %d") nroots; let root = Array.get roots 0 in @@ -274,7 +279,8 @@ let process_image acc_entries filename repo tmprepo index interactive match arch with | Index.Arch arch | Index.GuessedArch arch -> arch in - error (f_"Already existing image with id %s and architecture %s") id arch + error (f_"Already existing image with id %s and architecture %s") + id arch ); let printable_name = @@ -420,7 +426,7 @@ let main () = (* Create a temporary folder to work in *) let tmpdir = Mkdtemp.temp_dir ~base_dir:cmdline.repo "virt-builder-repository." in - On_exit.rmdir tmpdir; + On_exit.rm_rf tmpdir; let tmprepo = tmpdir // "repo" in mkdir_p tmprepo 0o700; @@ -451,7 +457,8 @@ let main () = (* Check for index/interactive consistency *) if not cmdline.interactive && index = [] then - error (f_"the repository must contain an index file when running in automated mode"); + error (f_"the repository must contain an index file when \ + running in automated mode"); debug "Searching for images ..."; diff --git a/builder/repository_main.mli b/builder/repository_main.mli index fb964f4..e6f20f4 100644 --- a/builder/repository_main.mli +++ b/builder/repository_main.mli @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2016-2020 SUSE Inc. + * Copyright (C) 2016-2023 SUSE 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 diff --git a/builder/setlocale.ml b/builder/setlocale.ml index 9b3289d..341d681 100644 --- a/builder/setlocale.ml +++ b/builder/setlocale.ml @@ -26,4 +26,5 @@ type localecategory = | LC_MESSAGES ;; -external setlocale : localecategory -> string option -> string option = "virt_builder_setlocale" +external setlocale : localecategory -> string option -> string option = + "virt_builder_setlocale" diff --git a/builder/sigchecker.ml b/builder/sigchecker.ml index 72c9a26..343f0ba 100644 --- a/builder/sigchecker.ml +++ b/builder/sigchecker.ml @@ -43,7 +43,8 @@ let import_keyfile ~gpg ~gpghome ~tmpdir ?(trust = true) keyfile = (if verbose () then "" else " >/dev/null 2>&1") in let r = shell_command cmd in if r <> 0 then - error (f_"could not import public key\nUse the ‘-v’ option and look for earlier error messages."); + error (f_"could not import public key\n\ + Use the ‘-v’ option and look for earlier error messages."); let status = read_whole_file status_file in let status = String.nsplit "\n" status in let key_id = ref "" in @@ -62,12 +63,14 @@ let import_keyfile ~gpg ~gpghome ~tmpdir ?(trust = true) keyfile = (if verbose () then "" else " >/dev/null 2>&1") in let r = shell_command cmd in if r <> 0 then - error (f_"GPG failure: could not trust the imported key\nUse the ‘-v’ option and look for earlier error messages."); + error (f_"GPG failure: could not trust the imported key\n\ + Use the ‘-v’ option and look for earlier error messages."); ); let subkeys = (* --with-fingerprint is specified twice so gpg outputs the full * fingerprint of the subkeys. *) - let cmd = sprintf "%s --homedir %s --with-colons --with-fingerprint --with-fingerprint --list-keys %s%s" + let cmd = sprintf "%s --homedir %s --with-colons \ + --with-fingerprint --with-fingerprint --list-keys %s%s" gpg gpghome !fingerprint (if verbose () then "" else " 2>/dev/null") in let lines = external_command cmd in @@ -108,7 +111,8 @@ let rec create ~gpg ~gpgkey ~check_signature ~tmpdir = gpg gpgtmpdir (if verbose () then "" else " >/dev/null 2>&1") in let r = shell_command cmd in if r <> 0 then - error (f_"GPG failure: could not run GPG the first time\nUse the ‘-v’ option and look for earlier error messages."); + error (f_"GPG failure: could not run GPG the first time\n\ + Use the ‘-v’ option and look for earlier error messages."); match gpgkey with | No_Key -> assert false @@ -121,7 +125,8 @@ let rec create ~gpg ~gpgkey ~check_signature ~tmpdir = (if verbose () then "" else " >/dev/null 2>&1") in let r = shell_command cmd in if r <> 0 then - error (f_"could not export public key\nUse the ‘-v’ option and look for earlier error messages."); + error (f_"could not export public key\n\ + Use the ‘-v’ option and look for earlier error messages."); import_keyfile gpg gpgtmpdir tmpdir filename ) else "", [] in @@ -171,7 +176,12 @@ and verify_detached t filename sigfile = if t.check_signature then ( match sigfile with | None -> - error (f_"there is no detached signature file\nThis probably means the index file is missing a sig=... line.\nYou can use --no-check-signature to ignore this error, but that means you are susceptible to man-in-the-middle attacks.") + error (f_"there is no detached signature file\n\ + This probably means the index file is missing a \ + sig=... line.\n\ + You can use --no-check-signature to ignore this error, \ + but that means you are susceptible to \ + man-in-the-middle attacks.") | Some sigfile -> let args = sprintf "%s %s" (quote sigfile) (quote filename) in do_verify t args @@ -185,7 +195,8 @@ and verify_and_remove_signature t filename = let cmd = [ "cp"; filename; asc_file ] in if run_command cmd <> 0 then exit 1; let out_file = Filename.temp_file ~temp_dir:t.tmpdir "vbfile" "" in - let args = sprintf "--yes --output %s %s" (quote out_file) (quote filename) in + let args = + sprintf "--yes --output %s %s" (quote out_file) (quote filename) in do_verify ~verify_only:false t args; Some out_file ) else @@ -201,7 +212,11 @@ and do_verify ?(verify_only = true) t args = (quote status_file) args in let r = shell_command cmd in if r <> 0 then - error (f_"GPG failure: could not verify digital signature of file\nTry:\n - Use the ‘-v’ option and look for earlier error messages.\n - Delete the cache: virt-builder --delete-cache\n - Check no one has tampered with the website or your network!"); + error (f_"GPG failure: could not verify digital signature of file\n\ + Try:\n - Use the ‘-v’ option and look \ + for earlier error messages.\n\ + - Delete the cache: virt-builder --delete-cache\n\ + - Check no one has tampered with the website or your network!"); (* Check the fingerprint is who it should be. *) let status = read_whole_file status_file in @@ -217,6 +232,10 @@ and do_verify ?(verify_only = true) t args = ) status; if not (equal_fingerprints !fingerprint t.fingerprint) && - not (List.exists (equal_fingerprints !fingerprint) t.subkeys_fingerprints) then - error (f_"fingerprint of signature does not match the expected fingerprint!\n found fingerprint: %s\n expected fingerprint: %s") + not (List.exists (equal_fingerprints !fingerprint) + t.subkeys_fingerprints) then + error (f_"fingerprint of signature does not match the \ + expected fingerprint!\n\ + found fingerprint: %s\n\ + expected fingerprint: %s") !fingerprint t.fingerprint diff --git a/builder/simplestreams_parser.ml b/builder/simplestreams_parser.ml index 407eb11..70b4482 100644 --- a/builder/simplestreams_parser.ml +++ b/builder/simplestreams_parser.ml @@ -75,7 +75,8 @@ let get_index ~downloader ~sigchecker { Sources.uri; proxy } = let format = object_get_string "format" tree in if format <> "products:1.0" then - error (f_"%s is not a Simple Streams (products) v1.0 JSON file (format: %s)") + error (f_"%s is not a Simple Streams (products) \ + v1.0 JSON file (format: %s)") uri format; let products = object_get_object "products" tree in diff --git a/builder/sources.ml b/builder/sources.ml index d6de159..ce6c67e 100644 --- a/builder/sources.ml +++ b/builder/sources.ml @@ -45,7 +45,8 @@ let parse_conf file = let uri = try List.assoc ("uri", None) fields with Not_found as ex -> - eprintf (f_"%s: no ‘uri’ entry for ‘%s’ in %s, skipping it\n") prog n file; + eprintf (f_"%s: no ‘uri’ entry for ‘%s’ in %s, skipping it\n") + prog n file; raise ex in let gpgkey = let k = @@ -121,7 +122,8 @@ let read_sources () = let files = try List.filter filter_filenames (Array.to_list (Sys.readdir dir)) with Sys_error _ -> [] in - let files = List.filter (fun x -> StringSet.mem x !fnseen <> true) files in + let files = + List.filter (fun x -> StringSet.mem x !fnseen <> true) files in List.fold_left ( fun acc file -> try ( diff --git a/builder/templates/Makefile.am b/builder/templates/Makefile.am index 69123f2..64ceda4 100644 --- a/builder/templates/Makefile.am +++ b/builder/templates/Makefile.am @@ -1,5 +1,5 @@ # libguestfs virt-builder tool -# Copyright (C) 2013-2020 Red Hat Inc. +# Copyright (C) 2013-2023 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 diff --git a/builder/templates/Makefile.in b/builder/templates/Makefile.in index ee397ef..d0cb030 100644 --- a/builder/templates/Makefile.in +++ b/builder/templates/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs virt-builder tool -# Copyright (C) 2013-2020 Red Hat Inc. +# Copyright (C) 2013-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -425,7 +425,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -454,6 +453,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -524,6 +525,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml index c3386d3..b58e55e 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-2022 Red Hat Inc. + * Copyright (C) 2016-2023 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,8 @@ let () = (* Check that the ./run script was used. *) (try ignore (Sys.getenv "VIRT_BUILDER_DIRS") with Not_found -> - eprintf "%s: you must use `../../run ./make-template.ml ...' to run this script\n" + eprintf "%s: you must use `../../run ./make-template.ml ...' \ + to run this script\n" prog; exit 1 ); @@ -166,7 +167,8 @@ let rec main () = let chan = open_out (filename_of_os os arch ".virt-install-cmd") in fprintf chan "# This is the virt-install command which was used to create\n"; fprintf chan "# the virt-builder template '%s'\n" (string_of_os os arch); - fprintf chan "# NB: This file is generated for documentation purposes ONLY!\n"; + fprintf chan "# NB: This file is generated for documentation \ + purposes ONLY!\n"; fprintf chan "# This script was never run, and is not intended to be run.\n"; fprintf chan "\n"; print_virt_install_command chan vi; @@ -254,10 +256,7 @@ let rec main () = if can_sysprep_os os then ( (* Sysprep. Relabel SELinux-using guests. *) printf "Sysprepping ...\n%!"; - let cmd = - sprintf "virt-sysprep --quiet -a %s%s" - (quote tmpout) - (if is_selinux_os os then " --selinux-relabel" else "") in + let cmd = sprintf "virt-sysprep --quiet -a %s" (quote tmpout) in if Sys.command cmd <> 0 then exit 1 ); @@ -481,11 +480,6 @@ and can_sysprep_os = function | Debian _ | Ubuntu _ -> true | FreeBSD _ | Windows _ -> false -and is_selinux_os = function - | RHEL _ | Alma _ | CentOS _ | CentOSStream _ | Fedora _ -> true - | Debian _ | Ubuntu _ - | FreeBSD _ | Windows _ -> false - and needs_uefi os arch = match os, arch with | Fedora _, Armv7 @@ -640,7 +634,8 @@ poweroff # 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)\" +KERNEL_VERSION=\"$(rpm -q kernel --qf '%%{version}-%%{release}.%%{arch}\\n' | + sort -V | tail -1)\" dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION " in @@ -862,7 +857,8 @@ 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/" + Location (sprintf "http://mirror.cov.ukservers.com/almalinux/\ + %d.%d/BaseOS/x86_64/kickstart/" major minor) | CentOS (major, _), Aarch64 -> @@ -885,10 +881,12 @@ and make_boot_media os arch = Location "https://vault.centos.org/8.5.2111/BaseOS/x86_64/kickstart/" | CentOSStream 8, X86_64 -> - Location (sprintf "http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os") + Location (sprintf "http://mirror.centos.org/centos/8-stream/BaseOS/\ + x86_64/os") | CentOSStream ver, X86_64 -> - Location (sprintf "http://mirror.stream.centos.org/%d-stream/BaseOS/x86_64/os" ver) + Location (sprintf "http://mirror.stream.centos.org/%d-stream/BaseOS/\ + x86_64/os" ver) | Debian (_, dist), arch -> Location (sprintf "http://deb.debian.org/debian/dists/%s/main/installer-%s" @@ -896,82 +894,107 @@ and make_boot_media os arch = (* Fedora primary architectures. *) | Fedora ver, Armv7 -> - Location (sprintf "https://lon.mirror.rackspace.com/fedora/releases/%d/Server/armhfp/os/" ver) + Location (sprintf "https://lon.mirror.rackspace.com/fedora/releases/\ + %d/Server/armhfp/os/" ver) | Fedora ver, X86_64 when ver < 21 -> - Location (sprintf "https://lon.mirror.rackspace.com/fedora/releases/releases/%d/Fedora/x86_64/os/" ver) + Location (sprintf "https://lon.mirror.rackspace.com/fedora/releases/\ + releases/%d/Fedora/x86_64/os/" ver) | Fedora ver, X86_64 -> - Location (sprintf "https://lon.mirror.rackspace.com/fedora/releases/%d/Server/x86_64/os/" ver) + Location (sprintf "https://lon.mirror.rackspace.com/fedora/releases/\ + %d/Server/x86_64/os/" ver) | Fedora ver, Aarch64 -> - Location (sprintf "https://lon.mirror.rackspace.com/fedora/releases/%d/Server/aarch64/os/" ver) + Location (sprintf "https://lon.mirror.rackspace.com/fedora/releases/\ + %d/Server/aarch64/os/" ver) (* Fedora secondary architectures. * By using dl.fedoraproject.org we avoid randomly using mirrors * which might have incomplete copies. *) | Fedora ver, I686 -> - Location (sprintf "https://dl.fedoraproject.org/pub/fedora-secondary/releases/%d/Server/i386/os/" ver) + Location (sprintf "https://dl.fedoraproject.org/pub/fedora-secondary/\ + releases/%d/Server/i386/os/" ver) | Fedora ver, PPC64 -> - Location (sprintf "https://dl.fedoraproject.org/pub/fedora-secondary/releases/%d/Server/ppc64/os/" ver) + Location (sprintf "https://dl.fedoraproject.org/pub/fedora-secondary/\ + releases/%d/Server/ppc64/os/" ver) | Fedora ver, PPC64le -> - Location (sprintf "https://dl.fedoraproject.org/pub/fedora-secondary/releases/%d/Server/ppc64le/os/" ver) + Location (sprintf "https://dl.fedoraproject.org/pub/fedora-secondary/\ + releases/%d/Server/ppc64le/os/" ver) | Fedora ver, S390X -> - Location (sprintf "https://dl.fedoraproject.org/pub/fedora-secondary/releases/%d/Server/s390x/os/" ver) + Location (sprintf "https://dl.fedoraproject.org/pub/fedora-secondary/\ + releases/%d/Server/s390x/os/" ver) | RHEL (3, minor), X86_64 -> - Location (sprintf "http://download.devel.redhat.com/released/RHEL-3/U%d/AS/x86_64/tree" minor) + Location (sprintf "http://download.devel.redhat.com/released/RHEL-3/\ + U%d/AS/x86_64/tree" minor) | RHEL (4, minor), X86_64 -> - Location (sprintf "http://download.devel.redhat.com/released/RHEL-4/U%d/AS/x86_64/tree" minor) + Location (sprintf "http://download.devel.redhat.com/released/RHEL-4/\ + U%d/AS/x86_64/tree" minor) | RHEL (5, minor), I686 -> - Location (sprintf "http://download.devel.redhat.com/released/RHEL-5-Server/U%d/i386/os" minor) + Location (sprintf "http://download.devel.redhat.com/released/\ + RHEL-5-Server/U%d/i386/os" minor) | RHEL (5, minor), X86_64 -> - Location (sprintf "http://download.devel.redhat.com/released/RHEL-5-Server/U%d/x86_64/os" minor) + Location (sprintf "http://download.devel.redhat.com/released/\ + RHEL-5-Server/U%d/x86_64/os" minor) | RHEL (6, minor), I686 -> - Location (sprintf "http://download.devel.redhat.com/released/RHEL-6/6.%d/Server/i386/os" minor) + Location (sprintf "http://download.devel.redhat.com/released/\ + RHEL-6/6.%d/Server/i386/os" minor) | RHEL (6, minor), X86_64 -> - Location (sprintf "http://download.devel.redhat.com/released/RHEL-6/6.%d/Server/x86_64/os" minor) + Location (sprintf "http://download.devel.redhat.com/released/\ + RHEL-6/6.%d/Server/x86_64/os" minor) | RHEL (7, minor), X86_64 -> - Location (sprintf "http://download.devel.redhat.com/released/rhel-6-7-8/rhel-7/RHEL-7/7.%d/Server/x86_64/os" minor) + Location (sprintf "http://download.devel.redhat.com/released/\ + rhel-6-7-8/rhel-7/RHEL-7/7.%d/Server/x86_64/os" minor) | RHEL (7, minor), PPC64 -> - Location (sprintf "http://download.devel.redhat.com/released/rhel-6-7-8/rhel-7/RHEL-7/7.%d/Server/ppc64/os" minor) + Location (sprintf "http://download.devel.redhat.com/released/\ + rhel-6-7-8/rhel-7/RHEL-7/7.%d/Server/ppc64/os" minor) | RHEL (7, minor), PPC64le -> - Location (sprintf "http://download.devel.redhat.com/released/rhel-6-7-8/rhel-7/RHEL-7/7.%d/Server/ppc64le/os" minor) + Location (sprintf "http://download.devel.redhat.com/released/\ + rhel-6-7-8/rhel-7/RHEL-7/7.%d/Server/ppc64le/os" minor) | RHEL (7, minor), S390X -> - Location (sprintf "http://download.devel.redhat.com/released/rhel-6-7-8/rhel-7/RHEL-7/7.%d/Server/s390x/os" minor) + Location (sprintf "http://download.devel.redhat.com/released/\ + rhel-6-7-8/rhel-7/RHEL-7/7.%d/Server/s390x/os" minor) | RHEL (7, minor), Aarch64 -> - Location (sprintf "http://download.eng.bos.redhat.com/released/RHEL-ALT-7/7.%d/Server/aarch64/os" minor) + Location (sprintf "http://download.eng.bos.redhat.com/released/\ + RHEL-ALT-7/7.%d/Server/aarch64/os" minor) | RHEL (8, minor), arch -> - Location (sprintf "http://download.eng.bos.redhat.com/released/rhel-6-7-8/rhel-8/RHEL-8/8.%d.0/BaseOS/%s/os" minor (string_of_arch arch)) + Location (sprintf "http://download.eng.bos.redhat.com/released/\ + rhel-6-7-8/rhel-8/RHEL-8/8.%d.0/BaseOS/%s/os" + minor (string_of_arch arch)) | RHEL (9, minor), arch -> - Location (sprintf "http://download.eng.bos.redhat.com/released/RHEL-9/9.%d.0/BaseOS/%s/os" minor (string_of_arch arch)) + Location (sprintf "http://download.eng.bos.redhat.com/released/\ + RHEL-9/9.%d.0/BaseOS/%s/os" minor (string_of_arch arch)) | Ubuntu (_, dist), X86_64 -> - Location (sprintf "http://archive.ubuntu.com/ubuntu/dists/%s/main/installer-amd64" dist) + Location (sprintf "http://archive.ubuntu.com/ubuntu/dists/\ + %s/main/installer-amd64" dist) | Ubuntu (_, dist), PPC64le -> - Location (sprintf "http://ports.ubuntu.com/ubuntu-ports/dists/%s/main/installer-ppc64el" dist) + Location (sprintf "http://ports.ubuntu.com/ubuntu-ports/dists/\ + %s/main/installer-ppc64el" dist) | FreeBSD (major, minor), X86_64 -> let iso = sprintf "FreeBSD-%d.%d-RELEASE-amd64-disc1.iso" major minor in - let iso_xz = sprintf "ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/%d.%d/%s.xz" + let iso_xz = sprintf "ftp://ftp.freebsd.org/pub/FreeBSD/releases/\ + amd64/amd64/ISO-IMAGES/%d.%d/%s.xz" major minor iso in let cmd = sprintf "wget -nc %s" (quote iso_xz) in if Sys.command cmd <> 0 then exit 1; @@ -993,13 +1016,15 @@ and make_boot_media os arch = | 10, 0, Server, X86_64 -> (* Windows Server 2016 *) "en_windows_server_2016_updated_feb_2018_x64_dvd_11636692.iso" | _ -> - eprintf "%s: don't have an installer ISO for this version of Windows\n" + eprintf "%s: don't have an installer ISO for this version of \ + Windows\n" prog; exit 1 in CDRom (windows_installers // iso_name) | _ -> - eprintf "%s: don't know how to calculate the --location for this OS and architecture\n" prog; + eprintf "%s: don't know how to calculate the --location for this OS \ + and architecture\n" prog; exit 1 and print_install_notes = function @@ -1111,7 +1136,9 @@ and make_virt_install_command os arch ks tmpname tmpout tmpefivars * 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 + 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 _ | CentOSStream _ -> @@ -1260,7 +1287,8 @@ and kernel_cmdline_of_os os arch = | _, S390X -> "console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH" | _, Aarch64 -> - "console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel no_timer_check printk.time=1 rd_NO_PLYMOUTH" + "console=ttyAMA0 earlyprintk=pl011,0x9000000 ignore_loglevel \ + no_timer_check printk.time=1 rd_NO_PLYMOUTH" | _, Armv7 -> "console=tty0 console=ttyAMA0,115200 rd_NO_PLYMOUTH" | (Debian _|Fedora _|Ubuntu _), (PPC64|PPC64le) -> @@ -1499,14 +1527,16 @@ and notes_of_os os arch nvram = | CentOS _ -> add "This CentOS image contains only unmodified @Core group packages." | CentOSStream _ -> - add "This CentOS Stream image contains only unmodified @Core group packages." + add "This CentOS Stream image contains only unmodified @Core \ + group packages." | Debian _ -> add "This is a minimal Debian install." | Fedora _ -> add "This Fedora image contains only unmodified @Core group packages."; add ""; add "Fedora and the Infinity design logo are trademarks of Red Hat, Inc."; - add "Source and further information is available from http://fedoraproject.org/" + add "Source and further information is available from \ + http://fedoraproject.org/" | RHEL _ -> assert false (* cannot happen, see caller *) | Ubuntu _ -> add "This is a minimal Ubuntu install." @@ -1617,7 +1647,8 @@ and open_guest ?(mount = false) filename = let roots = g#inspect_os () in if Array.length roots = 0 then ( - eprintf "%s: cannot inspect this guest - this may mean guest installation failed\n" prog; + eprintf "%s: cannot inspect this guest - \ + this may mean guest installation failed\n" prog; exit 1 ); diff --git a/builder/templates/validate.sh b/builder/templates/validate.sh index e1e58b7..eebc31e 100755 --- a/builder/templates/validate.sh +++ b/builder/templates/validate.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs virt-builder validate index -# Copyright (C) 2013-2020 Red Hat Inc. +# Copyright (C) 2013-2023 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 diff --git a/builder/utils.ml b/builder/utils.ml index 37a16cd..0e87d63 100644 --- a/builder/utils.ml +++ b/builder/utils.ml @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 diff --git a/builder/utils.mli b/builder/utils.mli index 4f799e7..7bbcb6e 100644 --- a/builder/utils.mli +++ b/builder/utils.mli @@ -1,5 +1,5 @@ (* virt-builder - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 diff --git a/builder/virt-builder-repository.pod b/builder/virt-builder-repository.pod index 1fdd263..3af49e9 100644 --- a/builder/virt-builder-repository.pod +++ b/builder/virt-builder-repository.pod @@ -215,4 +215,4 @@ Cédric Bosdonnat L =head1 COPYRIGHT -Copyright (C) 2016-2020 SUSE Inc. +Copyright (C) 2016-2023 SUSE Inc. diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod index f7dd6cd..aeb5052 100644 --- a/builder/virt-builder.pod +++ b/builder/virt-builder.pod @@ -131,12 +131,6 @@ To update the installed packages to the latest version: virt-builder debian-7 --update -For guests which use SELinux, like Fedora and Red Hat Enterprise -Linux, you may need to do SELinux relabelling after installing or -updating packages (see L below): - - virt-builder fedora-27 --update --selinux-relabel - =head2 Customizing the installation There are many options that let you customize the installation. These @@ -972,7 +966,7 @@ command line. =item * -SELinux relabelling is done (I<--selinux-relabel>). +SELinux relabelling is done unless disabled with I<--no-selinux-relabel>. =back @@ -1072,8 +1066,7 @@ A typical virt-builder command would be: --install puppet \ --append-line '/etc/puppet/puppet.conf:[agent]' \ --append-line '/etc/puppet/puppet.conf:server = puppetmaster.example.com/' \ - --run-command 'systemctl enable puppet' \ - --selinux-relabel + --run-command 'systemctl enable puppet' The precise instructions vary according to the Linux distro. For further information see: @@ -1753,14 +1746,14 @@ two possible strategies it can use to ensure correct labelling: =over 4 -=item Using I<--selinux-relabel> +=item Automatic relabeling This runs L just before finalizing the guest, which sets SELinux labels correctly in the disk image. This is the recommended method. -=item I<--touch> F +=item Using I<--no-selinux-relabel> I<--touch> F Guest templates may already contain a file called F or you may touch it. @@ -1771,11 +1764,6 @@ them, which is normal and harmless. =back -Please note that if your guest uses SELinux, and you are doing operations -on it which might create new files or change existing ones, you are -recommended to use I<--selinux-relabel>. This will help in making sure -that files have the right SELinux labels. - =head1 MACHINE READABLE OUTPUT The I<--machine-readable> option can be used to make the output more diff --git a/cat/Makefile.am b/cat/Makefile.am index f1de5c8..0be3723 100644 --- a/cat/Makefile.am +++ b/cat/Makefile.am @@ -1,5 +1,5 @@ # libguestfs virt-cat, virt-filesystems, virt-log, virt-ls and virt-tail. -# Copyright (C) 2010-2020 Red Hat Inc. +# Copyright (C) 2010-2023 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 diff --git a/cat/Makefile.in b/cat/Makefile.in index ebbf968..d44063b 100644 --- a/cat/Makefile.in +++ b/cat/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs virt-cat, virt-filesystems, virt-log, virt-ls and virt-tail. -# Copyright (C) 2010-2020 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -539,7 +539,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -568,6 +567,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -638,6 +639,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/cat/cat.c b/cat/cat.c index 5b51b7d..6baa350 100644 --- a/cat/cat.c +++ b/cat/cat.c @@ -1,5 +1,5 @@ /* virt-cat - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 @@ -250,6 +250,9 @@ main (int argc, char *argv[]) /* Add drives, inspect and mount. */ add_drives (drvs); + if (key_store_requires_network (ks) && guestfs_set_network (g, 1) == -1) + exit (EXIT_FAILURE); + if (guestfs_launch (g) == -1) exit (EXIT_FAILURE); diff --git a/cat/filesystems.c b/cat/filesystems.c index 8ddb0a6..12c1977 100644 --- a/cat/filesystems.c +++ b/cat/filesystems.c @@ -1,5 +1,5 @@ /* virt-filesystems - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 diff --git a/cat/log.c b/cat/log.c index df7e2be..2cd5a65 100644 --- a/cat/log.c +++ b/cat/log.c @@ -1,5 +1,5 @@ /* virt-log - * Copyright (C) 2010-2020 Red Hat Inc. + * Copyright (C) 2010-2023 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 @@ -70,7 +70,7 @@ usage (int status) getprogname ()); else { printf (_("%s: display log files in a virtual machine\n" - "Copyright (C) 2010-2020 Red Hat Inc.\n" + "Copyright (C) 2010-2023 Red Hat Inc.\n" "Usage:\n" " %s [--options] -d domname\n" " %s [--options] -a disk.img [-a disk.img ...]\n" @@ -224,6 +224,9 @@ main (int argc, char *argv[]) */ add_drives (drvs); + if (key_store_requires_network (ks) && guestfs_set_network (g, 1) == -1) + exit (EXIT_FAILURE); + if (guestfs_launch (g) == -1) exit (EXIT_FAILURE); diff --git a/cat/ls.c b/cat/ls.c index e062823..d09fec5 100644 --- a/cat/ls.c +++ b/cat/ls.c @@ -1,5 +1,5 @@ /* virt-ls - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 @@ -98,7 +98,7 @@ usage (int status) getprogname ()); else { printf (_("%s: list files in a virtual machine\n" - "Copyright (C) 2010-2012 Red Hat Inc.\n" + "Copyright (C) 2010-2023 Red Hat Inc.\n" "Usage:\n" " %s [--options] -d domname dir [dir ...]\n" " %s [--options] -a disk.img [-a disk.img ...] dir [dir ...]\n" @@ -374,6 +374,9 @@ main (int argc, char *argv[]) /* Add drives, inspect and mount. */ add_drives (drvs); + if (key_store_requires_network (ks) && guestfs_set_network (g, 1) == -1) + exit (EXIT_FAILURE); + if (guestfs_launch (g) == -1) exit (EXIT_FAILURE); diff --git a/cat/tail.c b/cat/tail.c index 1cf1d6e..2a06e0e 100644 --- a/cat/tail.c +++ b/cat/tail.c @@ -296,6 +296,9 @@ do_tail (int argc, char *argv[], /* list of files in the guest */ /* Add drives, inspect and mount. */ add_drives (drvs); + if (key_store_requires_network (ks) && guestfs_set_network (g, 1) == -1) + exit (EXIT_FAILURE); + if (guestfs_launch (g) == -1) return -1; diff --git a/cat/test-virt-cat.sh b/cat/test-virt-cat.sh index 89ffc94..2c84574 100755 --- a/cat/test-virt-cat.sh +++ b/cat/test-virt-cat.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/cat/test-virt-filesystems.sh b/cat/test-virt-filesystems.sh index 5fccada..852cbf9 100755 --- a/cat/test-virt-filesystems.sh +++ b/cat/test-virt-filesystems.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/cat/test-virt-log.sh b/cat/test-virt-log.sh index 957c8fa..0db94a0 100755 --- a/cat/test-virt-log.sh +++ b/cat/test-virt-log.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/cat/test-virt-ls.sh b/cat/test-virt-ls.sh index 02e1f02..e98faa4 100755 --- a/cat/test-virt-ls.sh +++ b/cat/test-virt-ls.sh @@ -23,6 +23,7 @@ skip_if_skipped # Read out the test directory using virt-ls. if [ "$($VG virt-ls --format=raw -a ../test-data/phony-guests/fedora.img /bin)" != "ls +rpm test1 test2 test3 @@ -39,7 +40,9 @@ output="$($VG virt-ls -lR --format=raw -a ../test-data/phony-guests/fedora.img / expected="d0755/boot d0755/boot/grub -0644/boot/grub/grub.conf -d0700/boot/lost+found" +-0644/boot/initramfs-5.19.0-0.rc1.14.fc37.x86_64.img +d0700/boot/lost+found +-0644/boot/vmlinuz-5.19.0-0.rc1.14.fc37.x86_64" if [ "$output" != "$expected" ]; then echo "$0: error: unexpected output from virt-ls -lR" echo "output: ------------------------------------------" diff --git a/cat/virt-cat.pod b/cat/virt-cat.pod index aabe085..663eae0 100644 --- a/cat/virt-cat.pod +++ b/cat/virt-cat.pod @@ -290,4 +290,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2010-2012 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/cat/virt-filesystems.pod b/cat/virt-filesystems.pod index 5e9ae66..2b47f12 100644 --- a/cat/virt-filesystems.pod +++ b/cat/virt-filesystems.pod @@ -388,6 +388,7 @@ L, L, L, L, +L, L, L, L, @@ -399,4 +400,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2010-2012 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/cat/virt-log.pod b/cat/virt-log.pod index 4eb4c2d..900d14e 100644 --- a/cat/virt-log.pod +++ b/cat/virt-log.pod @@ -151,4 +151,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2010-2020 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/cat/virt-ls.pod b/cat/virt-ls.pod index ba3894c..a638e4e 100644 --- a/cat/virt-ls.pod +++ b/cat/virt-ls.pod @@ -532,4 +532,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/common/.gitignore b/common/.gitignore index 10ab268..49915e3 100644 --- a/common/.gitignore +++ b/common/.gitignore @@ -35,6 +35,7 @@ Makefile.in /errnostring/errnostring.h /mlcustomize/.depend /mlcustomize/test-firstboot-*.sh +/mldrivers/.depend /mlgettext/.depend /mlgettext/common_gettext.ml /mlpcre/.depend diff --git a/common/edit/Makefile.in b/common/edit/Makefile.in index 09aa827..e555ded 100644 --- a/common/edit/Makefile.in +++ b/common/edit/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -270,7 +270,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -299,6 +298,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -369,6 +370,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/mlcustomize/Makefile.am b/common/mlcustomize/Makefile.am index cd7d897..767011f 100644 --- a/common/mlcustomize/Makefile.am +++ b/common/mlcustomize/Makefile.am @@ -38,10 +38,14 @@ generator_built = \ SOURCES_MLI = \ firstboot.mli \ + guest_packages.mli \ + inject_virtio_win.mli \ SELinux_relabel.mli SOURCES_ML = \ firstboot.ml \ + guest_packages.ml \ + inject_virtio_win.ml \ SELinux_relabel.ml if HAVE_OCAML @@ -73,7 +77,8 @@ libmlcustomize_a_CPPFLAGS = \ -I$(top_srcdir)/common/mlstdutils \ -I$(top_srcdir)/common/mlgettext \ -I$(top_srcdir)/common/mlpcre \ - -I$(top_srcdir)/common/mltools + -I$(top_srcdir)/common/mltools \ + -I$(top_srcdir)/common/mlxml libmlcustomize_a_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ -fPIC @@ -89,6 +94,7 @@ OCAMLPACKAGES = \ -I $(top_builddir)/common/mlgettext \ -I $(top_builddir)/common/mlpcre \ -I $(top_builddir)/common/mltools \ + -I $(top_builddir)/common/mlxml \ -I $(builddir) OCAMLPACKAGES_TESTS = $(MLCUSTOMIZE_CMA) if HAVE_OCAML_PKG_GETTEXT diff --git a/common/mlcustomize/Makefile.in b/common/mlcustomize/Makefile.in index 9c12178..fc8fc53 100644 --- a/common/mlcustomize/Makefile.in +++ b/common/mlcustomize/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -487,7 +487,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -516,6 +515,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -586,6 +587,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -748,10 +750,14 @@ generator_built = \ SOURCES_MLI = \ firstboot.mli \ + guest_packages.mli \ + inject_virtio_win.mli \ SELinux_relabel.mli SOURCES_ML = \ firstboot.ml \ + guest_packages.ml \ + inject_virtio_win.ml \ SELinux_relabel.ml @@ -775,7 +781,8 @@ SOURCES_ML = \ @HAVE_OCAML_TRUE@ -I$(top_srcdir)/common/mlstdutils \ @HAVE_OCAML_TRUE@ -I$(top_srcdir)/common/mlgettext \ @HAVE_OCAML_TRUE@ -I$(top_srcdir)/common/mlpcre \ -@HAVE_OCAML_TRUE@ -I$(top_srcdir)/common/mltools +@HAVE_OCAML_TRUE@ -I$(top_srcdir)/common/mltools \ +@HAVE_OCAML_TRUE@ -I$(top_srcdir)/common/mlxml @HAVE_OCAML_TRUE@libmlcustomize_a_CFLAGS = \ @HAVE_OCAML_TRUE@ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ @@ -789,7 +796,8 @@ SOURCES_ML = \ @HAVE_OCAML_TRUE@ $(top_builddir)/common/mlstdutils -I \ @HAVE_OCAML_TRUE@ $(top_builddir)/common/mlgettext -I \ @HAVE_OCAML_TRUE@ $(top_builddir)/common/mlpcre -I \ -@HAVE_OCAML_TRUE@ $(top_builddir)/common/mltools -I $(builddir) \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/mltools -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/mlxml -I $(builddir) \ @HAVE_OCAML_TRUE@ $(am__append_1) @HAVE_OCAML_TRUE@OCAMLPACKAGES_TESTS = $(MLCUSTOMIZE_CMA) @HAVE_OCAML_TRUE@OCAMLCLIBS = \ diff --git a/common/mlcustomize/customize-options.pod b/common/mlcustomize/customize-options.pod index 71b545d..22a96e0 100644 --- a/common/mlcustomize/customize-options.pod +++ b/common/mlcustomize/customize-options.pod @@ -6,7 +6,7 @@ libguestfs generated file and from the code in the generator/ subdirectory. ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. - Copyright (C) 2009-2020 Red Hat Inc. + Copyright (C) 2009-2023 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 @@ -169,6 +169,54 @@ L. Set the hostname of the guest to C. You can use a dotted hostname.domainname (FQDN) if you want. +=item B<--inject-qemu-ga> METHOD + +Inject the QEMU Guest Agent into a Windows guest. The guest +agent communicates with qemu through a socket in order to +provide enhanced features (see L). This operation +also injects a firstboot script so that the Guest Agent is +installed when the guest boots. + +The parameter is the same as used by the I<--inject-virtio-win> operation. + +Note that to do a full conversion of a Windows guest from a +foreign hypervisor like VMware (which involves many other operations) +you should use the L tool instead of this. + +=item B<--inject-virtio-win> METHOD + +Inject virtio-win drivers into a Windows guest. These drivers +add virtio accelerated drivers suitable when running on top of +a hypervisor that supports virtio (such as qemu/KVM). The +operation also adjusts the Windows Registry so that the drivers +are installed when the guest boots. + +The parameter can be one of: + +=over 4 + +=item ISO + +The path to the ISO image containing the virtio-win drivers +(eg. F). + +=item DIR + +The directory containing the unpacked virtio-win drivers +(eg. F). + +=item B<"osinfo"> + +The literal string C<"osinfo"> means to use the +libosinfo database to locate the drivers. (See +L. + +=back + +Note that to do a full conversion of a Windows guest from a +foreign hypervisor like VMware (which involves many other operations) +you should use the L tool instead of this. + =item B<--install> PKG,PKG.. Install the named packages (a comma-separated list). These are @@ -206,6 +254,19 @@ the image was built, use this option. See also: L. +=item B<--no-selinux-relabel> + +Do not attempt to correct the SELinux labels of files in the guest. + +In such guests that support SELinux, customization automatically +relabels files so that they have the correct SELinux label. (The +relabeling is performed immediately, but if the operation fails, +customization will instead touch F on the image to +schedule a relabel operation for the next time the image boots.) This +option disables the automatic relabeling. + +The option is a no-op for guests that do not support SELinux. + =item B<--password> USER:SELECTOR Set the password for C. (Note this option does I @@ -299,13 +360,7 @@ It cannot delete directories, only regular files. =item B<--selinux-relabel> -Relabel files in the guest so that they have the correct SELinux label. - -This will attempt to relabel files immediately, but if the operation fails -this will instead touch F on the image to schedule a -relabel operation for the next time the image boots. - -You should only use this option for guests which support SELinux. +This is a compatibility option that does nothing. =item B<--sm-attach> SELECTOR diff --git a/common/mlcustomize/customize-synopsis.pod b/common/mlcustomize/customize-synopsis.pod index 5f18540..d04f421 100644 --- a/common/mlcustomize/customize-synopsis.pod +++ b/common/mlcustomize/customize-synopsis.pod @@ -3,6 +3,7 @@ [--copy-in LOCALPATH:REMOTEDIR] [--delete PATH] [--edit FILE:EXPR] [--firstboot SCRIPT] [--firstboot-command 'CMD+ARGS'] [--firstboot-install PKG,PKG..] [--hostname HOSTNAME] + [--inject-qemu-ga METHOD] [--inject-virtio-win METHOD] [--install PKG,PKG..] [--link TARGET:LINK[:LINK..]] [--mkdir DIR] [--move SOURCE:DEST] [--password USER:SELECTOR] [--root-password SELECTOR] [--run SCRIPT] @@ -12,5 +13,5 @@ [--truncate-recursive PATH] [--timezone TIMEZONE] [--touch FILE] [--uninstall PKG,PKG..] [--update] [--upload FILE:DEST] [--write FILE:CONTENT] [--no-logfile] - [--password-crypto md5|sha256|sha512] [--selinux-relabel] - [--sm-credentials SELECTOR] + [--password-crypto md5|sha256|sha512] [--no-selinux-relabel] + [--selinux-relabel] [--sm-credentials SELECTOR] diff --git a/common/mlcustomize/customize_cmdline.ml b/common/mlcustomize/customize_cmdline.ml index 9326baa..3c24315 100644 --- a/common/mlcustomize/customize_cmdline.ml +++ b/common/mlcustomize/customize_cmdline.ml @@ -4,7 +4,7 @@ * and from the code in the generator/ subdirectory. * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. * - * Copyright (C) 2009-2020 Red Hat Inc. + * Copyright (C) 2009-2023 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 @@ -59,6 +59,10 @@ and op = [ (* --firstboot-install PKG,PKG.. *) | `Hostname of string (* --hostname HOSTNAME *) + | `InjectQemuGA of string + (* --inject-qemu-ga METHOD *) + | `InjectVirtioWin of string + (* --inject-virtio-win METHOD *) | `InstallPackages of string list (* --install PKG,PKG.. *) | `Link of string * string list @@ -109,7 +113,9 @@ and flags = { (* --no-logfile *) password_crypto : Password.password_crypto option; (* --password-crypto md5|sha256|sha512 *) - selinux_relabel : bool; + no_selinux_relabel : bool; + (* --no-selinux-relabel *) + selinux_relabel_ignored : bool; (* --selinux-relabel *) sm_credentials : Subscription_manager.sm_credentials option; (* --sm-credentials SELECTOR *) @@ -121,7 +127,8 @@ let rec argspec () = let ops = ref [] in let scrub_logfile = ref false in let password_crypto = ref None in - let selinux_relabel = ref false in + let no_selinux_relabel = ref false in + let selinux_relabel_ignored = ref false in let sm_credentials = ref None in let rec get_ops () = { @@ -131,7 +138,8 @@ let rec argspec () = and get_flags () = { scrub_logfile = !scrub_logfile; password_crypto = !password_crypto; - selinux_relabel = !selinux_relabel; + no_selinux_relabel = !no_selinux_relabel; + selinux_relabel_ignored = !selinux_relabel_ignored; sm_credentials = !sm_credentials; } in @@ -258,6 +266,18 @@ let rec argspec () = s_"Set the hostname" ), Some "HOSTNAME", "Set the hostname of the guest to C. You can use a\ndotted hostname.domainname (FQDN) if you want."; + ( + [ L"inject-qemu-ga" ], + Getopt.String (s_"METHOD", fun s -> List.push_front (`InjectQemuGA s) ops), + s_"Inject the QEMU Guest Agent into a Windows guest" + ), + Some "METHOD", "Inject the QEMU Guest Agent into a Windows guest. The guest\nagent communicates with qemu through a socket in order to\nprovide enhanced features (see L). This operation\nalso injects a firstboot script so that the Guest Agent is\ninstalled when the guest boots.\n\nThe parameter is the same as used by the I<--inject-virtio-win> operation.\n\nNote that to do a full conversion of a Windows guest from a\nforeign hypervisor like VMware (which involves many other operations)\nyou should use the L tool instead of this."; + ( + [ L"inject-virtio-win" ], + Getopt.String (s_"METHOD", fun s -> List.push_front (`InjectVirtioWin s) ops), + s_"Inject virtio-win drivers into a Windows guest" + ), + Some "METHOD", "Inject virtio-win drivers into a Windows guest. These drivers\nadd virtio accelerated drivers suitable when running on top of\na hypervisor that supports virtio (such as qemu/KVM). The\noperation also adjusts the Windows Registry so that the drivers\nare installed when the guest boots.\n\nThe parameter can be one of:\n\n=over 4\n\n=item ISO\n\nThe path to the ISO image containing the virtio-win drivers\n(eg. F).\n\n=item DIR\n\nThe directory containing the unpacked virtio-win drivers\n(eg. F).\n\n=item B<\"osinfo\">\n\nThe literal string C<\"osinfo\"> means to use the\nlibosinfo database to locate the drivers. (See\nL.\n\n=back\n\nNote that to do a full conversion of a Windows guest from a\nforeign hypervisor like VMware (which involves many other operations)\nyou should use the L tool instead of this."; ( [ L"install" ], Getopt.String ( @@ -458,12 +478,18 @@ let rec argspec () = s_"Set password crypto" ), Some "md5|sha256|sha512", "When the virt tools change or set a password in the guest, this\noption sets the password encryption of that password to\nC, C or C.\n\nC and C require glibc E 2.7 (check crypt(3) inside\nthe guest).\n\nC will work with relatively old Linux guests (eg. RHEL 3), but\nis not secure against modern attacks.\n\nThe default is C unless libguestfs detects an old guest that\ndidn't have support for SHA-512, in which case it will use C.\nYou can override libguestfs by specifying this option.\n\nNote this does not change the default password encryption used\nby the guest when you create new user accounts inside the guest.\nIf you want to do that, then you should use the I<--edit> option\nto modify C (Fedora, RHEL) or\nC (Debian, Ubuntu)."; + ( + [ L"no-selinux-relabel" ], + Getopt.Set no_selinux_relabel, + s_"Do not relabel files with correct SELinux labels" + ), + None, "Do not attempt to correct the SELinux labels of files in the guest.\n\nIn such guests that support SELinux, customization automatically\nrelabels files so that they have the correct SELinux label. (The\nrelabeling is performed immediately, but if the operation fails,\ncustomization will instead touch F on the image to\nschedule a relabel operation for the next time the image boots.) This\noption disables the automatic relabeling.\n\nThe option is a no-op for guests that do not support SELinux."; ( [ L"selinux-relabel" ], - Getopt.Set selinux_relabel, - s_"Relabel files with correct SELinux labels" + Getopt.Set selinux_relabel_ignored, + s_"Compatibility option doing nothing" ), - None, "Relabel files in the guest so that they have the correct SELinux label.\n\nThis will attempt to relabel files immediately, but if the operation fails\nthis will instead touch F on the image to schedule a\nrelabel operation for the next time the image boots.\n\nYou should only use this option for guests which support SELinux."; + None, "This is a compatibility option that does nothing."; ( [ L"sm-credentials" ], Getopt.String ( diff --git a/common/mlcustomize/customize_cmdline.mli b/common/mlcustomize/customize_cmdline.mli index 14eda49..0cc166e 100644 --- a/common/mlcustomize/customize_cmdline.mli +++ b/common/mlcustomize/customize_cmdline.mli @@ -4,7 +4,7 @@ * and from the code in the generator/ subdirectory. * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. * - * Copyright (C) 2009-2020 Red Hat Inc. + * Copyright (C) 2009-2023 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 @@ -51,6 +51,10 @@ and op = [ (* --firstboot-install PKG,PKG.. *) | `Hostname of string (* --hostname HOSTNAME *) + | `InjectQemuGA of string + (* --inject-qemu-ga METHOD *) + | `InjectVirtioWin of string + (* --inject-virtio-win METHOD *) | `InstallPackages of string list (* --install PKG,PKG.. *) | `Link of string * string list @@ -101,7 +105,9 @@ and flags = { (* --no-logfile *) password_crypto : Password.password_crypto option; (* --password-crypto md5|sha256|sha512 *) - selinux_relabel : bool; + no_selinux_relabel : bool; + (* --no-selinux-relabel *) + selinux_relabel_ignored : bool; (* --selinux-relabel *) sm_credentials : Subscription_manager.sm_credentials option; (* --sm-credentials SELECTOR *) diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml index 5c7fd0d..5dc0123 100644 --- a/common/mlcustomize/firstboot.ml +++ b/common/mlcustomize/firstboot.ml @@ -151,7 +151,8 @@ WantedBy=%s and install_sysvinit_service g root distro major = match distro with - | "fedora"|"rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based" -> + | "fedora"|"rhel"|"centos"|"scientificlinux"|"oraclelinux"|"rocky"| + "redhat-based" -> install_sysvinit_redhat g | "opensuse"|"sles"|"suse-based" -> install_sysvinit_suse g @@ -368,3 +369,34 @@ let add_firstboot_script (g : Guestfs.guestfs) root ?(prio = 5000) name | _ -> error (f_"guest type %s/%s is not supported") typ distro + +(* Unfortunately Powershell scripts cannot be directly executed + * (unless some system config changes are made which for other + * reasons we don't want to do) and so we have to run this via + * a regular batch file. + *) +let add_firstboot_powershell g root ?prio name code = + (* Fail hard if inspection hasn't been done or it's not a Windows + * guest. If it happens it indicates an internal error in the + * calling code. + *) + assert (g#inspect_get_type root = "windows"); + + let windows_systemroot = g#inspect_get_windows_systemroot root in + + (* Create the temporary directory to put the Powershell file. *) + let tempdir = sprintf "%s/Temp" windows_systemroot in + g#mkdir_p tempdir; + let code = String.concat "\r\n" code ^ "\r\n" in + g#write (sprintf "%s/%s" tempdir name) code; + + (* Powershell interpreter. Should we check this exists? XXX *) + let ps_exe = + windows_systemroot ^ + "\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" in + + (* Windows path to the Powershell script. *) + let ps_path = windows_systemroot ^ "\\Temp\\" ^ name in + + let fb = sprintf "%s -ExecutionPolicy ByPass -file %s" ps_exe ps_path in + add_firstboot_script g root ?prio name fb diff --git a/common/mlcustomize/firstboot.mli b/common/mlcustomize/firstboot.mli index 67eb5ae..8231af6 100644 --- a/common/mlcustomize/firstboot.mli +++ b/common/mlcustomize/firstboot.mli @@ -21,8 +21,15 @@ val add_firstboot_script : Guestfs.guestfs -> string -> ?prio:int -> string -> (** [add_firstboot_script g root prio name content] adds a firstboot script called [name] containing [content] with priority [prio]. + [g] is the guestfs handle. The disks must be mounted up and + inspection data must be available. + [content] is the contents of the script, {b not} a filename. + The script is running using the shell (usually [/bin/sh]) on Linux + or as a Windows batch file. To use Windows Powershell, see + {!add_firstboot_powershell} instead. + The actual name of the script on the guest filesystem is made of [name] with all characters but alphanumeric replaced with dashes. @@ -35,3 +42,12 @@ val add_firstboot_script : Guestfs.guestfs -> string -> ?prio:int -> string -> For Linux guests using SELinux you should make sure the filesystem is relabelled after calling this. *) + +val add_firstboot_powershell : Guestfs.guestfs -> string -> + ?prio:int -> string -> string list -> unit +(** [add_firstboot_powershell] is like {!add_firstboot_script} except + that it adds a Windows Powershell script instead of a batch + file. + + The parameters are: [g root prio name lines] (where the Powershell + script is passed in as lines of code). *) diff --git a/common/mlcustomize/guest_packages.ml b/common/mlcustomize/guest_packages.ml new file mode 100644 index 0000000..2602fc7 --- /dev/null +++ b/common/mlcustomize/guest_packages.ml @@ -0,0 +1,132 @@ +(* virt-customize + * Copyright (C) 2012-2023 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 Printf + +open Common_gettext.Gettext +open Std_utils + +exception Unknown_package_manager of string +exception Unimplemented_package_manager of string + +(* Windows has package_management == "unknown". *) +let error_unknown_package_manager flag = + let msg = sprintf (f_"cannot use ‘%s’ because no package manager has been \ + detected for this guest OS.\n\nIf this guest OS is a \ + common one with ordinary package management then this \ + may have been caused by a failure of libguestfs \ + inspection.\n\nFor OSes such as Windows that lack \ + package management, this is not possible. Try using \ + one of the ‘--firstboot*’ flags instead (described in \ + the virt-customize(1) manual).") flag in + raise (Unknown_package_manager msg) + +let error_unimplemented_package_manager flag pm = + let msg = sprintf (f_"sorry, ‘%s’ with the ‘%s’ package manager has not \ + been implemented yet.\n\nYou can work around this by \ + using one of the ‘--run*’ or ‘--firstboot*’ options \ + instead (described in the virt-customize(1) manual).") + flag pm in + raise (Unimplemented_package_manager msg) + +(* http://distrowatch.com/dwres.php?resource=package-management *) +let install_command packages package_management = + let quoted_args = String.concat " " (List.map quote packages) in + match package_management with + | "apk" -> + sprintf " + apk update + apk add %s + " quoted_args + | "apt" -> + (* http://unix.stackexchange.com/questions/22820 *) + sprintf " + export DEBIAN_FRONTEND=noninteractive + apt_opts='-q -y -o Dpkg::Options::=--force-confnew' + apt-get $apt_opts update + apt-get $apt_opts install %s + " quoted_args + | "dnf" -> + sprintf "dnf%s -y install %s" + (if verbose () then " --verbose" else "") + quoted_args + | "pisi" -> sprintf "pisi it %s" quoted_args + | "pacman" -> sprintf "pacman -S --noconfirm %s" quoted_args + | "urpmi" -> sprintf "urpmi %s" quoted_args + | "xbps" -> sprintf "xbps-install -Sy %s" quoted_args + | "yum" -> sprintf "yum -y install %s" quoted_args + | "zypper" -> sprintf "zypper -n in -l %s" quoted_args + + | "unknown" -> + error_unknown_package_manager "--install" + | pm -> + error_unimplemented_package_manager "--install" pm + +let update_command package_management = + match package_management with + | "apk" -> + " + apk update + apk upgrade + " + | "apt" -> + (* http://unix.stackexchange.com/questions/22820 *) + " + export DEBIAN_FRONTEND=noninteractive + apt_opts='-q -y -o Dpkg::Options::=--force-confnew' + apt-get $apt_opts update + apt-get $apt_opts upgrade + " + | "dnf" -> + sprintf "dnf%s -y --best upgrade" + (if verbose () then " --verbose" else "") + | "pisi" -> "pisi upgrade" + | "pacman" -> "pacman -Su" + | "urpmi" -> "urpmi --auto-select" + | "xbps" -> "xbps-install -Suy" + | "yum" -> "yum -y update" + | "zypper" -> "zypper -n dup -l" + + | "unknown" -> + error_unknown_package_manager "--update" + | pm -> + error_unimplemented_package_manager "--update" pm + +let uninstall_command packages package_management = + let quoted_args = String.concat " " (List.map quote packages) in + match package_management with + | "apk" -> sprintf "apk del %s" quoted_args + | "apt" -> + (* http://unix.stackexchange.com/questions/22820 *) + sprintf " + export DEBIAN_FRONTEND=noninteractive + apt_opts='-q -y -o Dpkg::Options::=--force-confnew' + apt-get $apt_opts remove %s + " quoted_args + | "dnf" -> sprintf "dnf -y remove %s" quoted_args + | "pisi" -> sprintf "pisi rm %s" quoted_args + | "pacman" -> sprintf "pacman -R %s" quoted_args + | "urpmi" -> sprintf "urpme %s" quoted_args + | "xbps" -> sprintf "xbps-remove -Sy %s" quoted_args + | "yum" -> sprintf "yum -y remove %s" quoted_args + | "zypper" -> sprintf "zypper -n rm %s" quoted_args + + | "unknown" -> + error_unknown_package_manager "--uninstall" + | pm -> + error_unimplemented_package_manager "--uninstall" pm diff --git a/common/mlcustomize/guest_packages.mli b/common/mlcustomize/guest_packages.mli new file mode 100644 index 0000000..0aaca06 --- /dev/null +++ b/common/mlcustomize/guest_packages.mli @@ -0,0 +1,44 @@ +(* virt-customize + * Copyright (C) 2012-2023 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. + *) + +exception Unknown_package_manager of string +exception Unimplemented_package_manager of string +(** For all three functions below, [package_management] determines the package + management system in use by the guest; commonly it should be filled in from + [Guestfs.inspect_get_package_management], or the equivalent guestfs object + method. + + If [package_management] is unknown or unimplemented, the functions raise + [Unknown_package_manager "error message"] or [Unimplemented_package_manager + "error message"], correspondingly. *) + +val install_command : string list -> string -> string +(** [install_command packages package_management] produces a properly quoted + shell command string suitable for execution in the guest (directly or via a + Firstboot script) for installing the OS packages listed in [packages]. *) + +val update_command : string -> string +(** [update_command package_management] produces a properly quoted shell command + string suitable for execution in the guest (directly or via a Firstboot + script) for updating the OS packages that are currently installed in the + guest. *) + +val uninstall_command : string list -> string -> string +(** [uninstall_command packages package_management] produces a properly quoted + shell command string suitable for execution in the guest (directly or via a + Firstboot script) for uninstalling the OS packages listed in [packages]. *) diff --git a/common/mlcustomize/inject_virtio_win.ml b/common/mlcustomize/inject_virtio_win.ml new file mode 100644 index 0000000..5f4aab7 --- /dev/null +++ b/common/mlcustomize/inject_virtio_win.ml @@ -0,0 +1,576 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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 Printf + +open Std_utils +open Tools_utils +open Common_gettext.Gettext + +open Regedit + +type t = { + g : Guestfs.guestfs; (** guestfs handle *) + + root : string; (** root of inspection *) + + i_arch : string; + i_major_version : int; + i_minor_version : int; + i_osinfo : string; + i_product_variant : string; + i_windows_current_control_set : string; + i_windows_systemroot : string; + (** Inspection data needed by this module. *) + + virtio_win : string; + (** Path to the virtio-win ISO or directory. *) + + was_set : bool; + (** If the virtio_win path was explicitly set, for example by + the user setting an environment variable. + + This is used to "show intention" to use virtio-win instead + of libosinfo. Although this behaviour is documented, IMHO it has + always been a bad idea. We should change this in future to allow + the user to select where they want to get drivers from. XXX *) +} + +type block_type = Virtio_blk | IDE +and net_type = Virtio_net | E1000 | RTL8139 +and machine_type = I440FX | Q35 | Virt + +type virtio_win_installed = { + block_driver : block_type; + net_driver : net_type; + virtio_rng : bool; + virtio_balloon : bool; + isa_pvpanic : bool; + virtio_socket : bool; + machine : machine_type; + virtio_1_0 : bool; +} + +let rec from_environment g root datadir = + let t = get_inspection g root in + + let virtio_win, was_set = + try Sys.getenv "VIRTIO_WIN", true + with Not_found -> + try Sys.getenv "VIRTIO_WIN_DIR" (* old name for VIRTIO_WIN *), true + with Not_found -> + let iso = datadir // "virtio-win" // "virtio-win.iso" in + (if Sys.file_exists iso then iso + else datadir // "virtio-win"), false in + + { t with virtio_win; was_set } + +and from_path g root path = + let t = get_inspection g root in + { t with virtio_win = path; was_set = true } + +and from_libosinfo g root = + let t = get_inspection g root in + { t with virtio_win = ""; was_set = false } + +and get_inspection g root = + (* Fail hard if inspection hasn't been done or it's not a Windows + * guest. If it happens it indicates an internal error in the + * calling code. + *) + assert (g#inspect_get_type root = "windows"); + + let i_arch = g#inspect_get_arch root in + let i_major_version = g#inspect_get_major_version root in + let i_minor_version = g#inspect_get_minor_version root in + let i_osinfo = g#inspect_get_osinfo root in + let i_product_variant = g#inspect_get_product_variant root in + let i_windows_current_control_set = + g#inspect_get_windows_current_control_set root in + let i_windows_systemroot = g#inspect_get_windows_systemroot root in + + { g; root; + i_arch; i_major_version; i_minor_version; i_osinfo; + i_product_variant; i_windows_current_control_set; i_windows_systemroot; + virtio_win = ""; was_set = false } + +let scsi_class_guid = "{4D36E97B-E325-11CE-BFC1-08002BE10318}" +let viostor_legacy_pciid = "VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00" +let viostor_modern_pciid = "VEN_1AF4&DEV_1042&SUBSYS_11001AF4&REV_01" +let vioscsi_legacy_pciid = "VEN_1AF4&DEV_1004&SUBSYS_00081AF4&REV_00" +let vioscsi_modern_pciid = "VEN_1AF4&DEV_1048&SUBSYS_11001AF4&REV_01" + +let rec inject_virtio_win_drivers ({ g } as t) reg = + (* Copy the virtio drivers to the guest. *) + let driverdir = sprintf "%s/Drivers/VirtIO" t.i_windows_systemroot in + g#mkdir_p driverdir; + + (* XXX Inelegant hack copied originally from [Convert_windows]. + * We should be able to work this into the code properly later. + *) + let (machine : machine_type), virtio_1_0 = + match t.i_arch with + | ("i386"|"x86_64") -> + (try + (* Fall back to the decision that's based on the year that the OS + * was released in under three circumstances: + * - the user specified the location of the Windows virtio drivers + * through an environment variable, or + * - "Libosinfo_utils.get_os_by_short_id" fails to look up the OS, + * or + * - "Libosinfo_utils.best_driver" cannot find any matching driver. + * In each of these cases, a "Not_found" exception is raised. This + * behavior exactly mirrors that of "Windows_virtio.copy_drivers". + *) + if t.was_set then raise Not_found; + let os = Libosinfo_utils.get_os_by_short_id t.i_osinfo in + let devices = os#get_devices () + and drivers = os#get_device_drivers () in + let best_drv_devs = + (Libosinfo_utils.best_driver drivers t.i_arch).devices in + debug "libosinfo internal devices for OS \"%s\":\n%s" + t.i_osinfo + (Libosinfo_utils.string_of_osinfo_device_list devices); + debug "libosinfo \"best driver\" devices for OS \"%s\":\n%s" + t.i_osinfo + (Libosinfo_utils.string_of_osinfo_device_list best_drv_devs); + let { Libosinfo_utils.q35; vio10 } = + Libosinfo_utils.os_support_of_osinfo_device_list + (devices @ best_drv_devs) in + (if q35 then Q35 else I440FX), vio10 + with + | Not_found -> + (* Pivot on the year 2007. Any Windows version from earlier than + * 2007 should use i440fx, anything 2007 or newer should use q35. + * Luckily this coincides almost exactly with the release of NT 6. + *) + (if t.i_major_version < 6 then I440FX else Q35), true + ) + | _ -> Virt, true + in + + if not (copy_drivers t driverdir) then ( + warning (f_"there are no virtio drivers available for this version of Windows (%d.%d %s %s %s). virt-v2v looks for drivers in %s\n\nThe guest will be configured to use slower emulated devices.") + t.i_major_version t.i_minor_version t.i_arch + t.i_product_variant t.i_osinfo t.virtio_win; + { block_driver = IDE; net_driver = RTL8139; + virtio_rng = false; virtio_balloon = false; + isa_pvpanic = false; virtio_socket = false; + machine; virtio_1_0; } + ) + else ( + (* Can we install the block driver? *) + let block : block_type = + let filenames = ["virtio_blk"; "vrtioblk"; "viostor"] in + let viostor_driver = try ( + Some ( + List.find ( + fun driver_file -> + let source = driverdir // driver_file ^ ".sys" in + g#exists source + ) filenames + ) + ) with Not_found -> None in + match viostor_driver with + | None -> + warning (f_"there is no virtio block device driver for this version of Windows (%d.%d %s). virt-v2v looks for this driver in %s\n\nThe guest will be configured to use a slower emulated device.") + t.i_major_version t.i_minor_version + t.i_arch t.virtio_win; + IDE + + | Some driver_name -> + (* Block driver needs tweaks to allow booting; the rest is set up by PnP + * manager *) + let source = driverdir // (driver_name ^ ".sys") in + let target = sprintf "%s/system32/drivers/%s.sys" + t.i_windows_systemroot driver_name in + let target = g#case_sensitive_path target in + g#cp source target; + add_guestor_to_registry t reg driver_name viostor_legacy_pciid; + add_guestor_to_registry t reg driver_name viostor_modern_pciid; + Virtio_blk in + + (* Can we install the virtio-net driver? *) + let net : net_type = + let filenames = ["virtio_net.inf"; "netkvm.inf"] in + let has_netkvm = + List.exists ( + fun driver_file -> g#exists (driverdir // driver_file) + ) filenames in + if not has_netkvm then ( + warning (f_"there is no virtio network driver for this version of Windows (%d.%d %s). virt-v2v looks for this driver in %s\n\nThe guest will be configured to use a slower emulated device.") + t.i_major_version t.i_minor_version + t.i_arch t.virtio_win; + RTL8139 + ) + else + Virtio_net in + + (* The "fwcfg" driver binds the fw_cfg device for real, and provides three + * files -- ".cat", ".inf", ".sys". (Possibly ".pdb" too.) + * + * The "qemufwcfg" driver is only a stub driver; it placates Device Manager + * (hides the "unknown device" question mark) but does not actually drive + * the fw_cfg device. It provides two files only -- ".cat", ".inf". + * + * These drivers conflict with each other (RHBZ#2151752). If we've copied + * both (either from libosinfo of virtio-win), let "fwcfg" take priority: + * remove "qemufwcfg". + *) + if g#exists (driverdir // "fwcfg.inf") && + g#exists (driverdir // "qemufwcfg.inf") then ( + debug "windows: skipping qemufwcfg stub driver in favor of fwcfg driver"; + Array.iter g#rm (g#glob_expand (driverdir // "qemufwcfg.*")) + ); + + (* Did we install the miscellaneous drivers? *) + { block_driver = block; + net_driver = net; + virtio_rng = g#exists (driverdir // "viorng.inf"); + virtio_balloon = g#exists (driverdir // "balloon.inf"); + isa_pvpanic = g#exists (driverdir // "pvpanic.inf"); + virtio_socket = g#exists (driverdir // "viosock.inf"); + machine; virtio_1_0; + } + ) + +and inject_qemu_ga t = + let msi_files = copy_qemu_ga t in + if msi_files <> [] then + configure_qemu_ga t msi_files; + msi_files <> [] (* return true if we found some qemu-ga MSI files *) + +and add_guestor_to_registry t ((g, root) as reg) drv_name drv_pciid = + let ddb_node = g#hivex_node_get_child root "DriverDatabase" in + + let regedits = + if ddb_node = 0L then + cdb_regedits t drv_name drv_pciid + else + ddb_regedits t drv_name drv_pciid in + + let drv_sys_path = sprintf "system32\\drivers\\%s.sys" drv_name in + let common_regedits = [ + [ t.i_windows_current_control_set; "Services"; drv_name ], + [ "Type", REG_DWORD 0x1_l; + "Start", REG_DWORD 0x0_l; + "Group", REG_SZ "SCSI miniport"; + "ErrorControl", REG_DWORD 0x1_l; + "ImagePath", REG_EXPAND_SZ drv_sys_path ]; + ] in + + reg_import reg (regedits @ common_regedits) + +and cdb_regedits t drv_name drv_pciid = + (* See http://rwmj.wordpress.com/2010/04/30/tip-install-a-device-driver-in-a-windows-vm/ + * NB: All these edits are in the HKLM\SYSTEM hive. No other + * hive may be modified here. + *) + [ + [ t.i_windows_current_control_set; + "Control"; "CriticalDeviceDatabase"; + "PCI#" ^ drv_pciid ], + [ "Service", REG_SZ drv_name; + "ClassGUID", REG_SZ scsi_class_guid ]; + ] + +and ddb_regedits inspect drv_name drv_pciid = + (* Windows >= 8 doesn't use the CriticalDeviceDatabase. Instead + * one must add keys into the DriverDatabase. + *) + + let drv_inf = "guestor.inf" in + let drv_inf_label = drv_inf ^ "_tmp" in + let drv_config = "guestor_conf" in + + [ + [ "DriverDatabase"; "DriverInfFiles"; drv_inf ], + [ "", REG_MULTI_SZ [ drv_inf_label ]; + "Active", REG_SZ drv_inf_label; + "Configurations", REG_MULTI_SZ [ drv_config ] ]; + + [ "DriverDatabase"; "DeviceIds"; "PCI"; drv_pciid ], + [ drv_inf, REG_BINARY "\x01\xff\x00\x00" ]; + + [ "DriverDatabase"; "DriverPackages"; drv_inf_label ], + [ "Version", REG_BINARY ("\x00\xff\x09\x00\x00\x00\x00\x00" ^ + "\x7b\xe9\x36\x4d\x25\xe3\xce\x11" ^ + "\xbf\xc1\x08\x00\x2b\xe1\x03\x18" ^ + (String.make 24 '\x00')) ]; + (* Version is necessary for Windows-Kernel-Pnp in w10/w2k16 *) + + [ "DriverDatabase"; "DriverPackages"; drv_inf_label; + "Configurations"; drv_config ], + [ "ConfigFlags", REG_DWORD 0_l; + "Service", REG_SZ drv_name ]; + + [ "DriverDatabase"; "DriverPackages"; drv_inf_label; + "Descriptors"; "PCI"; drv_pciid ], + [ "Configuration", REG_SZ drv_config ]; + ] + +(* Copy the matching drivers to the driverdir; return true if any have + * been copied. + *) +and copy_drivers t driverdir = + (not t.was_set && [] <> copy_from_libosinfo t driverdir) || + [] <> copy_from_virtio_win t "/" driverdir + (virtio_iso_path_matches_guest_os t) + (fun () -> + error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log.")) + +and copy_qemu_ga t = + copy_from_virtio_win t "/" "/" (virtio_iso_path_matches_qemu_ga t) + (fun () -> + error (f_"root directory ‘/’ is missing from the virtio-win directory or ISO.\n\nThis should not happen and may indicate that virtio-win or virt-v2v is broken in some way. Please report this as a bug with a full debug log.")) + +(* Copy all files from virtio_win directory/ISO located in [srcdir] + * subdirectory and all its subdirectories to the [destdir]. The directory + * hierarchy is not preserved, meaning all files will be directly in [destdir]. + * The file list is filtered based on [filter] function. + * + * If [srcdir] is missing from the ISO then [missing ()] is called + * which might give a warning or error. + * + * Returns list of copied files. + *) +and copy_from_virtio_win ({ g } as t) srcdir destdir filter missing = + let ret = ref [] in + if is_directory t.virtio_win then ( + debug "windows: copy_from_virtio_win: guest tools source directory %s" + t.virtio_win; + + let dir = t.virtio_win // srcdir in + if not (is_directory dir) then missing () + else ( + let cmd = sprintf "cd %s && find -L -type f" (quote dir) in + let paths = external_command cmd in + List.iter ( + fun path -> + if filter path then ( + let source = dir // path in + let target_name = String.lowercase_ascii (Filename.basename path) in + let target = destdir // target_name in + debug "windows: copying guest tools bits: 'host:%s' -> '%s'" + source target; + + g#write target (read_whole_file source); + List.push_front target_name ret + ) + ) paths + ) + ) + else if is_regular_file t.virtio_win || is_block_device t.virtio_win then ( + debug "windows: copy_from_virtio_win: guest tools source ISO %s" + t.virtio_win; + + let g2 = + try + let g2 = open_guestfs ~identifier:"virtio_win" () in + g2#add_drive_opts t.virtio_win ~readonly:true; + g2#launch (); + g2 + with Guestfs.Error msg -> + error (f_"%s: cannot open virtio-win ISO file: %s") t.virtio_win msg in + (* Note we are mounting this as root on the *second* + * handle, not the main handle containing the guest. + *) + g2#mount_ro "/dev/sda" "/"; + let srcdir = "/" ^ srcdir in + if not (g2#is_dir srcdir) then missing () + else ( + let paths = g2#find srcdir in + Array.iter ( + fun path -> + let source = srcdir ^ "/" ^ path in + if g2#is_file source ~followsymlinks:false && filter path then ( + let target_name = String.lowercase_ascii (Filename.basename path) in + let target = destdir ^ "/" ^ target_name in + debug "windows: copying guest tools bits: '%s:%s' -> '%s'" + t.virtio_win path target; + + g#write target (g2#read_file source); + List.push_front target_name ret + ) + ) paths; + ); + g2#close() + ); + !ret + +(* Given a path of a file relative to the root of the directory tree + * with virtio-win drivers, figure out if it's suitable for the + * specific Windows flavor of the current guest. + *) +and virtio_iso_path_matches_guest_os t path = + let { i_major_version = os_major; i_minor_version = os_minor; + i_arch = arch; i_product_variant = os_variant; + i_osinfo = osinfo } = t in + try + (* Lowercased path, since the ISO may contain upper or lowercase path + * elements. + *) + let lc_path = String.lowercase_ascii path in + + (* Using the full path, work out what version of Windows + * this driver is for. Paths can be things like: + * "NetKVM/2k12R2/amd64/netkvm.sys" or + * "./drivers/amd64/Win2012R2/netkvm.sys". + * Note we check lowercase paths. + *) + let pathelem elem = String.find lc_path ("/" ^ elem ^ "/") >= 0 in + let p_arch = + if pathelem "x86" || pathelem "i386" then "i386" + else if pathelem "amd64" then "x86_64" + else raise Not_found in + + let is_client os_variant = os_variant = "Client" + and not_client os_variant = os_variant <> "Client" + and any_variant os_variant = true + and any_osinfo osinfo = true in + let p_os_major, p_os_minor, match_os_variant, match_osinfo = + if pathelem "xp" || pathelem "winxp" then + (5, 1, any_variant, any_osinfo) + else if pathelem "2k3" || pathelem "win2003" then + (5, 2, any_variant, any_osinfo) + else if pathelem "vista" then + (6, 0, is_client, any_osinfo) + else if pathelem "2k8" || pathelem "win2008" then + (6, 0, not_client, any_osinfo) + else if pathelem "w7" || pathelem "win7" then + (6, 1, is_client, any_osinfo) + else if pathelem "2k8r2" || pathelem "win2008r2" then + (6, 1, not_client, any_osinfo) + else if pathelem "w8" || pathelem "win8" then + (6, 2, is_client, any_osinfo) + else if pathelem "2k12" || pathelem "win2012" then + (6, 2, not_client, any_osinfo) + else if pathelem "w8.1" || pathelem "win8.1" then + (6, 3, is_client, any_osinfo) + else if pathelem "2k12r2" || pathelem "win2012r2" then + (6, 3, not_client, any_osinfo) + else if pathelem "w10" || pathelem "win10" then + (10, 0, is_client, ((=) "win10")) + else if pathelem "w11" || pathelem "win11" then + (10, 0, is_client, ((=) "win11")) + else if pathelem "2k16" || pathelem "win2016" then + (10, 0, not_client, ((=) "win2k16")) + else if pathelem "2k19" || pathelem "win2019" then + (10, 0, not_client, ((=) "win2k19")) + else if pathelem "2k22" || pathelem "win2022" then + (10, 0, not_client, ((=) "win2k22")) + else + raise Not_found in + + arch = p_arch && os_major = p_os_major && os_minor = p_os_minor && + match_os_variant os_variant && + match_osinfo osinfo + + with Not_found -> false + +(* Given a path of a file relative to the root of the directory tree + * with virtio-win drivers, figure out if it's suitable for the + * specific Windows flavor of the current guest. + *) +and virtio_iso_path_matches_qemu_ga t path = + (* Lowercased path, since the ISO may contain upper or lowercase path + * elements. + *) + let lc_name = String.lowercase_ascii (Filename.basename path) in + match t.i_arch, lc_name with + | ("i386", "qemu-ga-x86.msi") + | ("i386", "qemu-ga-i386.msi") + | ("i386", "rhev-qga.msi") + | ("x86_64", "qemu-ga-x64.msi") + | ("x86_64", "qemu-ga-x86_64.msi") + | ("x86_64", "rhev-qga64.msi") -> true + | _ -> false + +(* Look up in libosinfo for the OS, and copy all the locally + * available files specified as drivers for that OS to the [destdir]. + * + * This function does nothing in case either: + * - the osinfo short ID is not found in the libosinfo DB + * - the OS does not have any driver for the architecture of the guest + * - the location of the drivers is not a local directory + * + * Files that do not exist are silently skipped. + * + * Returns list of copied files. + *) +and copy_from_libosinfo { g; i_osinfo; i_arch } destdir = + try + let os = Libosinfo_utils.get_os_by_short_id i_osinfo in + let drivers = os#get_device_drivers () in + let driver = Libosinfo_utils.best_driver drivers i_arch in + let uri = Xml.parse_uri driver.Libosinfo.location in + let basedir = + match uri.Xml.uri_path with + | Some p -> p + | None -> assert false in + List.filter_map ( + fun f -> + let source = basedir // f in + if not (Sys.file_exists source) then + None + else ( + let target_name = String.lowercase_ascii (Filename.basename f) in + let target = destdir ^ "/" ^ target_name in + debug "windows: copying guest tools bits (via libosinfo): 'host:%s' -> '%s'" + source target; + + g#write target (read_whole_file source); + Some target_name + ) + ) driver.Libosinfo.files + with Not_found -> [] + +and configure_qemu_ga t files = + List.iter ( + fun msi_path -> + (* Windows is a trashfire. + * https://stackoverflow.com/a/18730884 + * https://bugzilla.redhat.com/show_bug.cgi?id=1895323 + *) + let psh_script = ref [] in + let add = List.push_back psh_script in + + add "# Uncomment this line for lots of debug output."; + add "# Set-PSDebug -Trace 2"; + add ""; + add "Write-Host Removing any previously scheduled qemu-ga installation"; + add "schtasks.exe /Delete /TN Firstboot-qemu-ga /F"; + add ""; + add (sprintf + "Write-Host Scheduling delayed installation of qemu-ga from %s" + msi_path); + add "$d = (get-date).AddSeconds(120)"; + add "$dtfinfo = [System.Globalization.DateTimeFormatInfo]::CurrentInfo"; + add "$sdp = $dtfinfo.ShortDatePattern"; + add "$sdp = $sdp -replace 'y+', 'yyyy'"; + add "$sdp = $sdp -replace 'M+', 'MM'"; + add "$sdp = $sdp -replace 'd+', 'dd'"; + add "schtasks.exe /Create /SC ONCE `"; + add " /ST $d.ToString('HH:mm') /SD $d.ToString($sdp) `"; + add " /RU SYSTEM /TN Firstboot-qemu-ga `"; + add (sprintf " /TR \"C:\\%s /forcerestart /qn /l+*vx C:\\%s.log\"" + msi_path msi_path); + + Firstboot.add_firstboot_powershell t.g t.root + (sprintf "install-%s.ps1" msi_path) !psh_script; + ) files diff --git a/common/mlcustomize/inject_virtio_win.mli b/common/mlcustomize/inject_virtio_win.mli new file mode 100644 index 0000000..0ced02e --- /dev/null +++ b/common/mlcustomize/inject_virtio_win.mli @@ -0,0 +1,85 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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. + *) + +(** Values and functions for installing Windows virtio drivers. *) + +type t (** Handle *) + +type block_type = Virtio_blk | IDE +and net_type = Virtio_net | E1000 | RTL8139 +and machine_type = I440FX | Q35 | Virt + +type virtio_win_installed = { + block_driver : block_type; + net_driver : net_type; + virtio_rng : bool; + virtio_balloon : bool; + isa_pvpanic : bool; + virtio_socket : bool; + machine : machine_type; + virtio_1_0 : bool; +} +(** After calling {!install_drivers}, this describes what virtio-win + drivers we were able to install (and hence, what the guest requires). + eg. if [virtio_rng] is true then we installed the virtio RNG + device, otherwise we didn't. *) + +val from_path : Guestfs.guestfs -> string -> string -> t +(** Create a new virtio-win handle. The parameters are [g root path]. + + The [path] should point to either the virtio-win ISO + (eg. F) or the unpacked + directory (eg. F). + + The libosinfo database is ignored if you use this method. *) + +val from_libosinfo : Guestfs.guestfs -> string -> t +(** Create a new virtio-win handle. The parameters are [g root]. + + The libosinfo database will be used as the source for drivers. + The virtio-win ISO or unpacked directory is ignored if you use + this method. *) + +val from_environment : Guestfs.guestfs -> string -> string -> t +(** Using the [VIRTIO_WIN] environment variable (if present), set up + the injection handle. + + The parameters are: [g root datadir]. The [datadir] is the path + from ./configure (eg. {!Config.datadir}). + + This should only be used by [virt-v2v] and is considered a legacy method. *) + +val inject_virtio_win_drivers : t -> Registry.t -> virtio_win_installed +(** [inject_virtio_win_drivers t reg] + installs virtio drivers from the driver directory or driver + ISO into the guest driver directory and updates the registry + so that the [viostor.sys] driver gets loaded by Windows at boot. + + [reg] is the system hive which is open for writes when this + function is called. + + This returns a {!virtio_win_installed} struct reflecting what devices + are now required by the guest, either virtio devices if we managed to + install those, or legacy devices if we didn't. *) + +val inject_qemu_ga : t -> bool +(** Inject MSIs (ideally just one) with QEMU Guest Agent into a Windows + guest. A firstboot script is also injected which should install + the MSI(s). + + Returns [true] iff we were able to inject qemu-ga. *) diff --git a/common/mlcustomize/test-firstboot.sh b/common/mlcustomize/test-firstboot.sh index b906997..24c67f3 100755 --- a/common/mlcustomize/test-firstboot.sh +++ b/common/mlcustomize/test-firstboot.sh @@ -61,9 +61,6 @@ case "$guestname" in extra[${#extra[*]}]='/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,' ;; - fedora*|rhel*|centos*) - extra[${#extra[*]}]='--selinux-relabel' - ;; *) ;; esac diff --git a/common/mlcustomize/test-selinuxrelabel.sh b/common/mlcustomize/test-selinuxrelabel.sh index 86278c6..caf7521 100755 --- a/common/mlcustomize/test-selinuxrelabel.sh +++ b/common/mlcustomize/test-selinuxrelabel.sh @@ -41,13 +41,12 @@ virt-builder "$guestname" --quiet -o "$disk" # Test #1: relabel with the default configuration works. rm -f "$disk_overlay" guestfish -- disk-create "$disk_overlay" qcow2 -1 backingfile:"$disk" -virt-customize -a "$disk" --selinux-relabel +virt-customize -a "$disk" # Test #2: relabel with no SELINUXTYPE in the configuration. rm -f "$disk_overlay" guestfish -- disk-create "$disk_overlay" qcow2 -1 backingfile:"$disk" virt-customize -a "$disk" \ - --edit /etc/selinux/config:"s,^SELINUXTYPE=,#&,g" \ - --selinux-relabel + --edit /etc/selinux/config:"s,^SELINUXTYPE=,#&,g" rm "$disk" "$disk_overlay" diff --git a/common/mldrivers/Makefile.am b/common/mldrivers/Makefile.am new file mode 100644 index 0000000..8fb979e --- /dev/null +++ b/common/mldrivers/Makefile.am @@ -0,0 +1,102 @@ +# Common code for driver detection used by virt-drivers and virt-v2v +# Copyright (C) 2011-2023 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 = \ + $(SOURCES_MLI) \ + $(SOURCES_ML) \ + $(SOURCES_C) + +SOURCES_MLI = \ + firmware.mli \ + linux.mli \ + linux_bootloaders.mli \ + linux_kernels.mli \ + windows_drivers.mli + +SOURCES_ML = \ + firmware.ml \ + linux.ml \ + linux_bootloaders.ml \ + linux_kernels.ml \ + windows_drivers.ml + +SOURCES_C = \ + dummy.c + +# 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 +# objects and OCaml objects and link them into the OCaml library. +# This C library is never used. + +noinst_LIBRARIES = libmldrivers.a + +if !HAVE_OCAMLOPT +MLDRIVERS_CMA = mldrivers.cma +else +MLDRIVERS_CMA = mldrivers.cmxa +endif + +noinst_DATA = $(MLDRIVERS_CMA) + +libmldrivers_a_SOURCES = $(SOURCES_C) +libmldrivers_a_CPPFLAGS = \ + -DCAML_NAME_SPACE \ + -I. \ + -I$(top_builddir) \ + -I$(shell $(OCAMLC) -where) \ + -I$(top_srcdir)/common/mlgettext \ + -I$(top_srcdir)/common/mlpcre \ + -I$(top_srcdir)/common/mlstdutils \ + -I$(top_srcdir)/common/mltools +libmldrivers_a_CFLAGS = \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + -fPIC + +BOBJECTS = $(SOURCES_ML:.ml=.cmo) +XOBJECTS = $(BOBJECTS:.cmo=.cmx) + +OCAMLPACKAGES = \ + -package str,unix,guestfs \ + -I $(top_builddir)/common/mlgettext \ + -I $(top_builddir)/common/mlpcre \ + -I $(top_builddir)/common/mlstdutils \ + -I $(top_builddir)/common/mltools \ + -I $(builddir) +OCAMLPACKAGES_TESTS = $(MLDRIVERS_CMA) + +OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' + +if !HAVE_OCAMLOPT +OBJECTS = $(BOBJECTS) +else +OBJECTS = $(XOBJECTS) +endif + +libmldrivers_a_DEPENDENCIES = $(OBJECTS) + +$(MLDRIVERS_CMA): $(OBJECTS) libmldrivers.a + $(OCAMLFIND) mklib $(OCAMLPACKAGES) \ + $(OBJECTS) $(libmldrivers_a_OBJECTS) -o mldrivers + +# OCaml dependencies. +.depend: $(srcdir)/*.mli $(srcdir)/*.ml + $(top_builddir)/ocaml-dep.sh $^ +-include .depend + +.PHONY: docs diff --git a/common/mldrivers/Makefile.in b/common/mldrivers/Makefile.in new file mode 100644 index 0000000..b59abfc --- /dev/null +++ b/common/mldrivers/Makefile.in @@ -0,0 +1,956 @@ +# 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@ + +# Common code for driver detection used by virt-drivers and virt-v2v +# Copyright (C) 2011-2023 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-2023 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 = common/mldrivers +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 = +LIBRARIES = $(noinst_LIBRARIES) +ARFLAGS = cru +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = +libmldrivers_a_AR = $(AR) $(ARFLAGS) +libmldrivers_a_LIBADD = +am__objects_1 = libmldrivers_a-dummy.$(OBJEXT) +am_libmldrivers_a_OBJECTS = $(am__objects_1) +libmldrivers_a_OBJECTS = $(am_libmldrivers_a_OBJECTS) +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 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/libmldrivers_a-dummy.Po +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(libmldrivers_a_SOURCES) +DIST_SOURCES = $(libmldrivers_a_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(noinst_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/depcomp $(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@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ +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@ +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@ +REALPATH = @REALPATH@ +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 = \ + $(SOURCES_MLI) \ + $(SOURCES_ML) \ + $(SOURCES_C) + +SOURCES_MLI = \ + firmware.mli \ + linux.mli \ + linux_bootloaders.mli \ + linux_kernels.mli \ + windows_drivers.mli + +SOURCES_ML = \ + firmware.ml \ + linux.ml \ + linux_bootloaders.ml \ + linux_kernels.ml \ + windows_drivers.ml + +SOURCES_C = \ + dummy.c + + +# 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 +# objects and OCaml objects and link them into the OCaml library. +# This C library is never used. +noinst_LIBRARIES = libmldrivers.a +@HAVE_OCAMLOPT_FALSE@MLDRIVERS_CMA = mldrivers.cma +@HAVE_OCAMLOPT_TRUE@MLDRIVERS_CMA = mldrivers.cmxa +noinst_DATA = $(MLDRIVERS_CMA) +libmldrivers_a_SOURCES = $(SOURCES_C) +libmldrivers_a_CPPFLAGS = \ + -DCAML_NAME_SPACE \ + -I. \ + -I$(top_builddir) \ + -I$(shell $(OCAMLC) -where) \ + -I$(top_srcdir)/common/mlgettext \ + -I$(top_srcdir)/common/mlpcre \ + -I$(top_srcdir)/common/mlstdutils \ + -I$(top_srcdir)/common/mltools + +libmldrivers_a_CFLAGS = \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + -fPIC + +BOBJECTS = $(SOURCES_ML:.ml=.cmo) +XOBJECTS = $(BOBJECTS:.cmo=.cmx) +OCAMLPACKAGES = \ + -package str,unix,guestfs \ + -I $(top_builddir)/common/mlgettext \ + -I $(top_builddir)/common/mlpcre \ + -I $(top_builddir)/common/mlstdutils \ + -I $(top_builddir)/common/mltools \ + -I $(builddir) + +OCAMLPACKAGES_TESTS = $(MLDRIVERS_CMA) +OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' +@HAVE_OCAMLOPT_FALSE@OBJECTS = $(BOBJECTS) +@HAVE_OCAMLOPT_TRUE@OBJECTS = $(XOBJECTS) +libmldrivers_a_DEPENDENCIES = $(OBJECTS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly .po .gmo .c .lo .o .obj +$(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 common/mldrivers/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign common/mldrivers/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): + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +libmldrivers.a: $(libmldrivers_a_OBJECTS) $(libmldrivers_a_DEPENDENCIES) $(EXTRA_libmldrivers_a_DEPENDENCIES) + $(AM_V_at)-rm -f libmldrivers.a + $(AM_V_AR)$(libmldrivers_a_AR) libmldrivers.a $(libmldrivers_a_OBJECTS) $(libmldrivers_a_LIBADD) + $(AM_V_at)$(RANLIB) libmldrivers.a + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmldrivers_a-dummy.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libmldrivers_a-dummy.o: dummy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmldrivers_a_CPPFLAGS) $(CPPFLAGS) $(libmldrivers_a_CFLAGS) $(CFLAGS) -MT libmldrivers_a-dummy.o -MD -MP -MF $(DEPDIR)/libmldrivers_a-dummy.Tpo -c -o libmldrivers_a-dummy.o `test -f 'dummy.c' || echo '$(srcdir)/'`dummy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmldrivers_a-dummy.Tpo $(DEPDIR)/libmldrivers_a-dummy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy.c' object='libmldrivers_a-dummy.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmldrivers_a_CPPFLAGS) $(CPPFLAGS) $(libmldrivers_a_CFLAGS) $(CFLAGS) -c -o libmldrivers_a-dummy.o `test -f 'dummy.c' || echo '$(srcdir)/'`dummy.c + +libmldrivers_a-dummy.obj: dummy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmldrivers_a_CPPFLAGS) $(CPPFLAGS) $(libmldrivers_a_CFLAGS) $(CFLAGS) -MT libmldrivers_a-dummy.obj -MD -MP -MF $(DEPDIR)/libmldrivers_a-dummy.Tpo -c -o libmldrivers_a-dummy.obj `if test -f 'dummy.c'; then $(CYGPATH_W) 'dummy.c'; else $(CYGPATH_W) '$(srcdir)/dummy.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmldrivers_a-dummy.Tpo $(DEPDIR)/libmldrivers_a-dummy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy.c' object='libmldrivers_a-dummy.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmldrivers_a_CPPFLAGS) $(CPPFLAGS) $(libmldrivers_a_CFLAGS) $(CFLAGS) -c -o libmldrivers_a-dummy.obj `if test -f 'dummy.c'; then $(CYGPATH_W) 'dummy.c'; else $(CYGPATH_W) '$(srcdir)/dummy.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +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 $(LIBRARIES) $(DATA) +installdirs: +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 clean-noinstLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/libmldrivers_a-dummy.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +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-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/libmldrivers_a-dummy.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libtool clean-noinstLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags 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-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am + +.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)" + +$(MLDRIVERS_CMA): $(OBJECTS) libmldrivers.a + $(OCAMLFIND) mklib $(OCAMLPACKAGES) \ + $(OBJECTS) $(libmldrivers_a_OBJECTS) -o mldrivers + +# OCaml dependencies. +.depend: $(srcdir)/*.mli $(srcdir)/*.ml + $(top_builddir)/ocaml-dep.sh $^ +-include .depend + +.PHONY: docs + +# 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/common/mldrivers/dummy.c b/common/mldrivers/dummy.c new file mode 100644 index 0000000..ebab619 --- /dev/null +++ b/common/mldrivers/dummy.c @@ -0,0 +1,2 @@ +/* Dummy source, to be used for OCaml-based tools with no C sources. */ +enum { foo = 1 }; diff --git a/common/mldrivers/firmware.ml b/common/mldrivers/firmware.ml new file mode 100644 index 0000000..c77a879 --- /dev/null +++ b/common/mldrivers/firmware.ml @@ -0,0 +1,62 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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 Printf + +open Tools_utils + +module G = Guestfs + +type i_firmware = + | I_BIOS + | I_UEFI of string list + +let detect_firmware g = + let parttype_is_gpt dev = + try g#part_get_parttype dev = "gpt" + with G.Error msg as exn -> + (* If it's _not_ "unrecognised disk label" then re-raise it. *) + if g#last_errno () <> G.Errno.errno_EINVAL then raise exn; + debug "%s (ignored)" msg; + false + in + let accumulate_partition (esp_parts, bboot) part = + let dev = g#part_to_dev part in + if parttype_is_gpt dev then + let partnum = g#part_to_partnum part in + let part_type_guid = g#part_get_gpt_type dev partnum in + match part_type_guid with + (* EFI system partition *) + | "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" -> part :: esp_parts, bboot + (* BIOS boot partition *) + | "21686148-6449-6E6F-744E-656564454649" -> esp_parts, true + | _ -> esp_parts, bboot + else esp_parts, bboot + in + + let esp_partitions, bios_boot = + Array.fold_left accumulate_partition ([], false) (g#list_partitions ()) in + + (* If there's a BIOS boot partition present (0xef02 type for gdisk, + * "bios_grub" flag for parted), then this is likely a BIOS+GPT setup. + * In this case we prioritize BIOS boot partition and detect BIOS firmware, + * no matter how many ESPs we've found. + *) + match esp_partitions, bios_boot with + | _ :: _, false -> I_UEFI esp_partitions + | _ -> I_BIOS diff --git a/common/mldrivers/firmware.mli b/common/mldrivers/firmware.mli new file mode 100644 index 0000000..176faa8 --- /dev/null +++ b/common/mldrivers/firmware.mli @@ -0,0 +1,35 @@ +(* virt-v2v + * Copyright (C) 2009-2023 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +type i_firmware = + | I_BIOS + | I_UEFI of string list +(** Firmware type returned through inspection (as opposed to source + hypervisor information which could be different or missing). *) + +val detect_firmware : Guestfs.guestfs -> i_firmware +(** [detect_firmware g] sees if this guest could use UEFI to boot. It + should use GPT and it should have an EFI System Partition (ESP). + + If the guest has BIOS boot partition present, this is likely a BIOS+GPT + setup, so [I_BIOS] is returned. + + If it has ESP(s), then [I_UEFI devs] is returned where [devs] is the + list of at least one ESP. + + Otherwise, [I_BIOS] is returned. *) diff --git a/common/mldrivers/linux.ml b/common/mldrivers/linux.ml new file mode 100644 index 0000000..4e30a8e --- /dev/null +++ b/common/mldrivers/linux.ml @@ -0,0 +1,181 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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 Printf + +open Std_utils +open Tools_utils +open Common_gettext.Gettext + +module G = Guestfs + +let re_version = PCRE.compile "(\\d+)\\.(\\d+)" + +let augeas_reload g = + g#aug_load (); + debug_augeas_errors g + +let rec remove g root packages = + if packages <> [] then ( + do_remove g root packages; + (* Reload Augeas in case anything changed. *) + augeas_reload g + ) + +and do_remove g root packages = + assert (List.length packages > 0); + + let package_format = g#inspect_get_package_format root in + match package_format with + | "deb" -> + let cmd = [ "dpkg"; "--purge" ] @ packages in + let cmd = Array.of_list cmd in + ignore (g#command cmd); + + | "rpm" -> + let cmd = [ "rpm"; "-e"; "--allmatches" ] @ packages in + let cmd = Array.of_list cmd in + ignore (g#command cmd) + + | format -> + error (f_"don’t know how to remove packages using %s: packages: %s") + format (String.concat " " packages) + +let file_list_of_package (g : Guestfs.guestfs) root app = + let package_format = g#inspect_get_package_format root in + match package_format with + | "deb" -> + let cmd = [| "dpkg"; "-L"; app.G.app2_name |] in + debug "%s" (String.concat " " (Array.to_list cmd)); + let files = g#command_lines cmd in + let files = Array.to_list files in + List.sort compare files + + | "rpm" -> + (* Since RPM allows multiple packages installed with the same + * name, always check the full NEVR here (RHBZ#1161250). + * + * In RPM < 4.11 query commands that use the epoch number in the + * package name did not work. + * + * For example: + * RHEL 6 (rpm 4.8.0): + * $ rpm -q tar-2:1.23-11.el6.x86_64 + * package tar-2:1.23-11.el6.x86_64 is not installed + * Fedora 20 (rpm 4.11.2): + * $ rpm -q tar-2:1.26-30.fc20.x86_64 + * tar-1.26-30.fc20.x86_64 + *) + let is_rpm_lt_4_11 () = + let ver = + try + (* Since we're going to run 'rpm' below anyway, seems safe + * to run it here and assume the binary works. + *) + let cmd = [| "rpm"; "--version" |] in + debug "%s" (String.concat " " (Array.to_list cmd)); + let ver = g#command_lines cmd in + let ver = if Array.length ver > 0 then ver.(0) else raise Not_found in + debug "%s" ver; + let ver = String.nsplit " " ver in + let ver = + match ver with + | [ "RPM"; "version"; ver ] -> ver + | _ -> raise Not_found in + if not (PCRE.matches re_version ver) then raise Not_found; + (int_of_string (PCRE.sub 1), int_of_string (PCRE.sub 2)) + with Not_found -> + (* 'rpm' not installed? Hmm... *) + (0, 0) in + ver < (4, 11) + in + let pkg_name = + if app.G.app2_epoch = Int32.zero || is_rpm_lt_4_11 () then + sprintf "%s-%s-%s" app.G.app2_name app.G.app2_version + app.G.app2_release + else + sprintf "%s-%ld:%s-%s" app.G.app2_name app.G.app2_epoch + app.G.app2_version app.G.app2_release in + let cmd = [| "rpm"; "-ql"; pkg_name |] in + debug "%s" (String.concat " " (Array.to_list cmd)); + let files = g#command_lines cmd in + (* RPM prints "(contains no files)" on stdout when a package + * has no files in it: + * https://github.com/rpm-software-management/rpm/issues/962 + *) + if files = [| "(contains no files)" |] then + [] + else ( + let files = Array.to_list files in + List.sort compare files + ) + + | format -> + error (f_"don’t know how to get list of files from package using %s") + format + +let is_file_owned (g : G.guestfs) root path = + let package_format = g#inspect_get_package_format root in + match package_format with + | "deb" -> + (* With dpkg usually the directories are owned by all the packages + * that install anything in them. Also with multiarch the same + * package is allowed (although with different architectures). + * This function returns only one package in all the cases. + *) + let cmd = [| "dpkg"; "-S"; path |] in + debug "%s" (String.concat " " (Array.to_list cmd)); + (try + let lines = g#command_lines cmd in + if Array.length lines = 0 then + error (f_"internal error: is_file_owned: dpkg command returned no output"); + (* Just check the output looks something like "pkg: filename". *) + if String.find lines.(0) ": " >= 0 then + true + else + error (f_"internal error: is_file_owned: unexpected output from dpkg command: %s") + lines.(0) + with Guestfs.Error msg as exn -> + if String.find msg "no path found matching pattern" >= 0 then + false + else + raise exn + ) + + | "rpm" -> + (* Run rpm -qf and print a magic string if the file is owned. + * If not owned, rpm will print "... is not owned by any package" + * and exit with an error. Unfortunately the string is sent to + * stdout, so here we ignore the exit status of rpm and just + * look for one of the two strings. + *) + let magic = "FILE_OWNED_TEST" in + let cmd = sprintf "rpm -qf --qf %s %s 2>&1 ||:" + (quote (magic ^ "\n")) (quote path) in + let r = g#sh cmd in + if String.find r magic >= 0 then true + else if String.find r "is not owned" >= 0 then false + else failwithf "RPM file owned test failed: %s" r + + | format -> + error (f_"don’t know how to find file owner using %s") format + +let is_package_manager_save_file filename = + (* Recognized suffixes of package managers. *) + let suffixes = [ ".dpkg-old"; ".dpkg-new"; ".rpmsave"; ".rpmnew"; ] in + List.exists (Filename.check_suffix filename) suffixes diff --git a/common/mldrivers/linux.mli b/common/mldrivers/linux.mli new file mode 100644 index 0000000..6304287 --- /dev/null +++ b/common/mldrivers/linux.mli @@ -0,0 +1,40 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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 Linux functions. *) + +val augeas_reload : Guestfs.guestfs -> unit +(** Wrapper around [g#aug_load], which (if verbose) provides + additional debugging information about parsing problems + that augeas found. *) + +val remove : Guestfs.guestfs -> string -> string list -> unit +(** [remove g root pkgs] uninstalls the package(s). *) + +val file_list_of_package : Guestfs.guestfs -> string -> + Guestfs.application2 -> string list +(** [file_list_of_package g root app] returns the list of files + owned by a package. *) + +val is_file_owned : Guestfs.guestfs -> string -> string -> bool +(** [is_file_owned g root path] returns true if the file is owned + by any installed package. *) + +val is_package_manager_save_file : string -> bool +(** Return true if the filename is something like [*.rpmsave], ie. + a package manager save-file. *) diff --git a/common/mldrivers/linux_bootloaders.ml b/common/mldrivers/linux_bootloaders.ml new file mode 100644 index 0000000..6f8857e --- /dev/null +++ b/common/mldrivers/linux_bootloaders.ml @@ -0,0 +1,406 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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 Printf + +open Std_utils +open Tools_utils +open Common_gettext.Gettext + +module G = Guestfs + +class virtual bootloader = object + method virtual name : string + method virtual augeas_device_patterns : string list + method virtual list_kernels : string list + method virtual set_default_kernel : string -> unit + method set_augeas_configuration () = false + method virtual configure_console : unit -> unit + method virtual remove_console : unit -> unit + method update () = () + method virtual get_config_file : unit -> string +end + +(* Helper function for SUSE: remove (hdX,X) prefix from a path. *) +let remove_hd_prefix = + let rex = PCRE.compile "^\\(hd.*\\)" in + PCRE.replace rex "" + +(* Grub1 (AKA grub-legacy) representation. *) +class bootloader_grub1 (g : G.guestfs) root grub_config = + let () = + (* Apply the "grub" lens if it is not handling the file + * already -- Augeas < 1.7.0 will error out otherwise. + *) + if g#aug_ls ("/files" ^ grub_config) = [||] then + g#aug_transform "grub" grub_config in + + (* Grub prefix? Usually "/boot". *) + let grub_prefix = + let mounts = g#inspect_get_mountpoints root in + try + List.find ( + fun path -> List.mem_assoc path mounts + ) [ "/boot/grub"; "/boot" ] + with Not_found -> "" in +object + inherit bootloader + + method name = "grub1" + + method augeas_device_patterns = [ + "/files" ^ grub_config ^ "/*/kernel/root"; + "/files" ^ grub_config ^ "/*/kernel/resume"; + "/files/boot/grub/device.map/*[label() != \"#comment\"]"; + "/files/etc/sysconfig/grub/boot"; + ] + + method list_kernels = + let paths = + let expr = sprintf "/files%s/title/kernel" grub_config in + let paths = g#aug_match expr in + let paths = Array.to_list paths in + + (* Remove duplicates. *) + let paths = List.remove_duplicates paths in + + (* Get the default kernel from grub if it's set. *) + let default = + let expr = sprintf "/files%s/default" grub_config in + try + let idx = g#aug_get expr in + let idx = int_of_string idx in + (* Grub indices are zero-based, augeas is 1-based. *) + let expr = + sprintf "/files%s/title[%d]/kernel" grub_config (idx+1) in + Some expr + with G.Error msg + when String.find msg "aug_get: no matching node" >= 0 -> + None in + + (* If a default kernel was set, put it at the beginning of the paths + * list. If not set, assume the first kernel always boots (?) + *) + match default with + | None -> paths + | Some p -> p :: List.filter ((<>) p) paths in + + (* Resolve the Augeas paths to kernel filenames. *) + let vmlinuzes = List.map g#aug_get paths in + + (* Make sure kernel does not begin with (hdX,X). *) + let vmlinuzes = List.map remove_hd_prefix vmlinuzes in + + (* Prepend grub filesystem. *) + List.map ((^) grub_prefix) vmlinuzes + + method set_default_kernel vmlinuz = + if not (String.is_prefix vmlinuz grub_prefix) then + error (f_"kernel %s is not under grub tree %s") + vmlinuz grub_prefix; + let kernel_under_grub_prefix = + let prefix_len = String.length grub_prefix in + let kernel_len = String.length vmlinuz in + String.sub vmlinuz prefix_len (kernel_len - prefix_len) in + + (* Find the grub entry for the given kernel. *) + let paths = g#aug_match (sprintf "/files%s/title/kernel[. = '%s']" + grub_config kernel_under_grub_prefix) in + let paths = Array.to_list paths in + if paths = [] then + error (f_"didn't find grub entry for kernel %s") vmlinuz; + let path = List.hd paths in + let rex = PCRE.compile "/title(?:\\[(\\d+)\\])?/kernel" in + if not (PCRE.matches rex path) then + error (f_"internal error: regular expression did not match ‘%s’") + path; + let index = try int_of_string (PCRE.sub 1) - 1 with Not_found -> 0 in + g#aug_set (sprintf "/files%s/default" grub_config) (string_of_int index); + g#aug_save () + + method set_augeas_configuration () = + let incls = g#aug_match "/augeas/load/Grub/incl" in + let incls = Array.to_list incls in + let incls_contains_conf = + List.exists (fun incl -> g#aug_get incl = grub_config) incls in + if not incls_contains_conf then ( + g#aug_set "/augeas/load/Grub/incl[last()+1]" grub_config; + true + ) else + false + + method configure_console () = + let rex = PCRE.compile "\\b([xh]vc0)\\b" in + let expr = sprintf "/files%s/title/kernel/console" grub_config in + + let paths = g#aug_match expr in + let paths = Array.to_list paths in + List.iter ( + fun path -> + let console = g#aug_get path in + let console' = PCRE.replace ~global:true rex "ttyS0" console in + if console <> console' then g#aug_set path console' + ) paths; + + g#aug_save () + + method remove_console () = + let rex = PCRE.compile "\\b([xh]vc0)\\b" in + let expr = sprintf "/files%s/title/kernel/console" grub_config in + + let rec loop = function + | [] -> () + | path :: paths -> + let console = g#aug_get path in + if PCRE.matches rex console then ( + ignore (g#aug_rm path); + (* All the paths are invalid, restart the loop. *) + let paths = g#aug_match expr in + let paths = Array.to_list paths in + loop paths + ) + else + loop paths + in + let paths = g#aug_match expr in + let paths = Array.to_list paths in + loop paths; + + g#aug_save () + + method get_config_file () = + grub_config +end + +(** The method used to get and set the default kernel in Grub2. *) +type default_kernel_method = + | MethodGrubby (** Use the 'grubby' tool. *) + | MethodPerlBootloader (** Use the 'Bootloader::Tools' Perl module. *) + | MethodNone (** No known way. *) + +(* Grub2 representation. *) +class bootloader_grub2 (g : G.guestfs) grub_config = + + let grub2_mkconfig_cmd = + let elems = [ + "/sbin/grub2-mkconfig"; + "/usr/sbin/grub2-mkconfig"; + "/sbin/grub-mkconfig"; + "/usr/sbin/grub-mkconfig" + ] in + try List.find (g#is_file ~followsymlinks:true) elems + with Not_found -> + error (f_"failed to find grub2-mkconfig binary (but Grub2 was detected on guest)") + in + + let get_default_method = + let has_perl_bootloader () = + try + ignore (g#command [| "/usr/bin/perl"; "-MBootloader::Tools"; "-e1" |]); + true + with G.Error _ -> false + in + if g#exists "/sbin/grubby" then MethodGrubby + else if has_perl_bootloader () then MethodPerlBootloader + else ( + warning (f_"could not determine a way to update the configuration of Grub2"); + MethodNone + ) in + +object (self) + inherit bootloader + + method name = "grub2" + + method augeas_device_patterns = [ + "/files/etc/sysconfig/grub/GRUB_CMDLINE_LINUX"; + "/files/etc/default/grub/GRUB_CMDLINE_LINUX"; + "/files/etc/default/grub/GRUB_CMDLINE_LINUX_DEFAULT"; + "/files/boot/grub2/device.map/*[label() != \"#comment\"]"; + "/files/boot/grub/device.map/*[label() != \"#comment\"]"; + ] + + method list_kernels = + let get_default_image () = + let res = + match get_default_method with + | MethodGrubby -> + let res = g#command [| "grubby"; "--default-kernel" |] in + (match res with + | "" -> None + | _ -> Some res) + | MethodPerlBootloader -> + let cmd = + [| "/usr/bin/perl"; "-MBootloader::Tools"; "-e"; " + InitLibrary(); + my $default = Bootloader::Tools::GetDefaultSection (); + if (!defined $default) { + print 'NODEFAULTSECTION' + } + elsif (exists $default->{image}) { + print $default->{image} + } + else { + die 'no $default->{image}' # should never happen + } + " |] in + let res = g#command cmd in + (match res with + | "NODEFAULTSECTION" -> None + | _ -> Some res) + | MethodNone -> + None in + match res with + | None -> None + | Some k -> + let k = String.chomp k in + Some (remove_hd_prefix k) + in + + let vmlinuzes = + (match get_default_image () with + | None -> [] + | Some k -> [k]) @ + (* This is how the grub2 config generator enumerates kernels. *) + Array.to_list (g#glob_expand "/boot/kernel-*") @ + Array.to_list (g#glob_expand "/boot/vmlinuz-*") @ + Array.to_list (g#glob_expand "/vmlinuz-*") in + let vmlinuzes = List.filter ( + fun filename -> not (Linux.is_package_manager_save_file filename) + ) vmlinuzes in + vmlinuzes + + method set_default_kernel vmlinuz = + match get_default_method with + | MethodGrubby -> + ignore (g#command [| "grubby"; "--set-default"; vmlinuz |]) + | MethodPerlBootloader -> + let cmd = + [| "/usr/bin/perl"; "-MBootloader::Tools"; "-e"; sprintf " + InitLibrary(); + my @sections = GetSectionList(type=>image, image=>\"%s\"); + my $section = GetSection(@sections); + my $newdefault = $section->{name}; + SetGlobals(default, \"$newdefault\"); + " vmlinuz |] in + ignore (g#command cmd) + | MethodNone -> () + + method private grub2_update_console ~remove () = + let rex = PCRE.compile "\\bconsole=[xh]vc0\\b" in + + let paths = [ + "/files/etc/sysconfig/grub/GRUB_CMDLINE_LINUX"; + "/files/etc/default/grub/GRUB_CMDLINE_LINUX"; + "/files/etc/default/grub/GRUB_CMDLINE_LINUX_DEFAULT" + ] in + let paths = List.map g#aug_match paths in + let paths = List.map Array.to_list paths in + let paths = List.flatten paths in + match paths with + | [] -> + if not remove then + warning (f_"could not add grub2 serial console (ignored)") + else + warning (f_"could not remove grub2 serial console (ignored)") + | path :: _ -> + let grub_cmdline = g#aug_get path in + if PCRE.matches rex grub_cmdline then ( + let new_grub_cmdline = + if not remove then + PCRE.replace ~global:true rex "console=ttyS0" grub_cmdline + else + PCRE.replace ~global:true rex "" grub_cmdline in + g#aug_set path new_grub_cmdline; + g#aug_save (); + + try + self#update () + with + G.Error msg -> + warning (f_"could not rebuild grub2 configuration file (%s). This may mean that grub output will not be sent to the serial port, but otherwise should be harmless. Original error message: %s") + grub_config msg + ) + + method configure_console = self#grub2_update_console ~remove:false + + method remove_console = self#grub2_update_console ~remove:true + + method update () = + ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |]); + + (* Grub2 runs osprober which sometimes leaves around read-only + * device-mapper maps covering existing filesystems. These + * confuse later steps (especially fstrim). So just delete + * any if found. (RHBZ#2003503). + *) + ignore (g#command [| "sh"; "-c"; "rm -f /dev/mapper/osprober-linux-*" |]) + + method get_config_file () = + grub_config +end + +(* Helper type used in detect_bootloader. *) +type bootloader_type = + | Grub1 + | Grub2 + +let detect_bootloader (g : G.guestfs) root i_firmware = + (* Where to start searching for bootloaders. *) + let mp = + match i_firmware with + | Firmware.I_BIOS -> "/boot" + | I_UEFI _ -> "/boot/efi/EFI" in + + (* Find all paths below the mountpoint, then filter them to find + * the grub config file. + *) + let paths = + try List.map ((^) mp) (Array.to_list (g#find mp)) + with G.Error msg -> + error (f_"could not find bootloader mount point (%s): %s") mp msg in + + (* We can determine if the bootloader config file is grub 1 or + * grub 2 just by looking at the filename. + *) + let bootloader_type_of_filename path = + match last_part_of path '/' with + | Some "grub.cfg" -> Some Grub2 + | Some ("grub.conf" | "menu.lst") -> Some Grub1 + | Some _ + | None -> None + in + + let grub_config, typ = + let rec loop = function + | [] -> error (f_"no bootloader detected") + | path :: paths -> + match bootloader_type_of_filename path with + | None -> loop paths + | Some typ -> + if not (g#is_file ~followsymlinks:true path) then loop paths + else path, typ + in + loop paths in + + let bl = + match typ with + | Grub1 -> new bootloader_grub1 g root grub_config + | Grub2 -> new bootloader_grub2 g grub_config in + debug "detected bootloader %s at %s" bl#name grub_config; + bl diff --git a/common/mldrivers/linux_bootloaders.mli b/common/mldrivers/linux_bootloaders.mli new file mode 100644 index 0000000..449ea5a --- /dev/null +++ b/common/mldrivers/linux_bootloaders.mli @@ -0,0 +1,57 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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. + *) + +class virtual bootloader : object + method virtual name : string + (** The name of the bootloader, for debugging messages. *) + + method virtual augeas_device_patterns : string list + (** A list of Augeas patterns to search for device names when we + need to rewrite device names (eg. [/dev/hda] to [/dev/vda]). *) + + method virtual list_kernels : string list + (** Lists all the kernels configured in the bootloader. *) + + method virtual set_default_kernel : string -> unit + (** Sets the specified vmlinuz path as default bootloader entry. *) + + method set_augeas_configuration : unit -> bool + (** Checks whether the bootloader configuration file is included + in Augeas load list, and if it is not, then include it. + + Returns true if Augeas needs to be reloaded. *) + + method virtual configure_console : unit -> unit + method virtual remove_console : unit -> unit + (** Adds or removes a serial console to all the available kernels. *) + + method update : unit -> unit + (** Update the bootloader: For grub2 only this runs the + [grub2-mkconfig] command to rebuild the configuration. This + is not necessary for grub-legacy. *) + + method virtual get_config_file : unit -> string + (** Returns the path to the bootloader config file, + e.g /boot/grub/grub.cfg *) +end +(** Encapsulates a Linux boot loader as object. *) + +val detect_bootloader : Guestfs.guestfs -> string -> Firmware.i_firmware -> + bootloader +(** [detect_bootloader g root i_firmware] detects the bootloader on the + guest, and creates the object representing it. *) diff --git a/common/mldrivers/linux_kernels.ml b/common/mldrivers/linux_kernels.ml new file mode 100644 index 0000000..a46146a --- /dev/null +++ b/common/mldrivers/linux_kernels.ml @@ -0,0 +1,343 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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. + *) + +(* Detect which kernels are installed and offered by the bootloader. *) + +open Printf + +open Std_utils +open Tools_utils +open Common_gettext.Gettext + +module G = Guestfs + +(* Kernel information. *) +type kernel_info = { + ki_app : G.application2; + ki_name : string; + ki_version : string; + ki_arch : string; + ki_vmlinuz : string; + ki_vmlinuz_stat : G.statns; + ki_initrd : string option; + ki_modpath : string; + ki_modules : string list; + ki_supports_virtio_blk : bool; + ki_supports_virtio_net : bool; + ki_supports_virtio_rng : bool; + ki_supports_virtio_balloon : bool; + ki_supports_isa_pvpanic : bool; + ki_supports_virtio_socket : bool; + ki_is_xen_pv_only_kernel : bool; + ki_is_debug : bool; + ki_config_file : string option; +} + +let print_kernel_info chan prefix ki = + let fpf fs = output_string chan prefix; fprintf chan fs in + fprintf chan "* %s %s (%s)\n" ki.ki_name ki.ki_version ki.ki_arch; + fpf "%s\n" ki.ki_vmlinuz; + fpf "%s\n" (match ki.ki_initrd with None -> "no initrd" | Some s -> s); + fpf "%s\n" (match ki.ki_config_file with None -> "no config" | Some s -> s); + fpf "%s\n" ki.ki_modpath; + fpf "%d modules found\n" (List.length ki.ki_modules); + fpf "virtio: blk=%b net=%b rng=%b balloon=%b\n" + ki.ki_supports_virtio_blk ki.ki_supports_virtio_net + ki.ki_supports_virtio_rng ki.ki_supports_virtio_balloon; + fpf "pvpanic=%b vsock=%b xen=%b debug=%b\n" + ki.ki_supports_isa_pvpanic ki.ki_supports_virtio_socket + ki.ki_is_xen_pv_only_kernel ki.ki_is_debug + +let rex_ko = PCRE.compile "\\.k?o(?:\\.(?:xz|zst))?$" +let rex_ko_extract = PCRE.compile "/([^/]+)\\.k?o(?:\\.(?:xz|zst))?$" + +let detect_kernels (g : G.guestfs) root bootloader apps = + (* What kernel/kernel-like packages are installed on the current guest? *) + let installed_kernels : kernel_info list = + let check_config feature = function + | None -> false + | Some config -> + let prefix = "^CONFIG_" ^ String.uppercase_ascii feature ^ "=" in + let lines = g#grep ~extended:true prefix config in + let lines = Array.to_list lines in + match lines with + | [] -> false + | line :: _ -> + let kind = snd (String.split "=" line) in + (match kind with + | "m" | "y" -> true + | _ -> false + ) + in + let rex_initrd = + let is_debian_family = + let distro = g#inspect_get_distro root in + match distro with + | "debian" | "ubuntu" | "linuxmint" | "kalilinux" -> true + | _ -> false in + if is_debian_family then + PCRE.compile "^initrd.img-.*$" + else + PCRE.compile "^initr(?:d|amfs)-.*(?:\\.img)?$" in + let kernel_pkgs = List.filter ( + fun { G.app2_name = name } -> + name = "kernel" + || (String.is_prefix name "kernel-" && not (String.is_suffix name "-devel")) + || String.is_prefix name "linux-image-" + ) apps in + if verbose () then ( + let names = List.map (fun { G.app2_name = name } -> name) kernel_pkgs in + eprintf "candidate kernel packages in this guest: %s%!\n" + (String.concat " " names) + ); + List.filter_map ( + fun ({ G.app2_name = name } as app) -> + (try + (* For each kernel, list the files directly owned by the kernel. *) + let files = Linux.file_list_of_package g root app in + + (* Which of these is the kernel itself? Also, make sure to check + * it exists by stat'ing it. + *) + let vmlinuz = List.find ( + fun filename -> String.is_prefix filename "/boot/vmlinuz-" + ) files in + let vmlinuz_stat = + try g#statns vmlinuz with G.Error _ -> raise Not_found in + + (* Determine the modpath from the package, falling back to the + * version in the vmlinuz file name. + *) + let modpath, version = + let prefix = "/lib/modules/" in + try + let prefix_len = String.length prefix in + List.find_map ( + fun filename -> + let filename_len = String.length filename in + if filename_len > prefix_len && + String.is_prefix filename prefix then ( + let version = String.sub filename prefix_len + (filename_len - prefix_len) in + Some (filename, version) + ) else + None + ) files + with Not_found -> + let version = + String.sub vmlinuz 14 (String.length vmlinuz - 14) in + let modpath = prefix ^ version in + modpath, version in + + (* Check that the modpath exists. *) + if not (g#is_dir ~followsymlinks:true modpath) then + raise Not_found; + + (* Find the initramfs which corresponds to the kernel. + * Since the initramfs is built at runtime, and doesn't have + * to be covered by the RPM file list, this is basically + * guesswork. + *) + let initrd = + let files = g#ls "/boot" in + let files = Array.to_list files in + let files = + List.filter (fun n -> PCRE.matches rex_initrd n) files in + let files = + List.filter ( + fun n -> + String.find n version >= 0 + ) files in + (* Don't consider kdump initramfs images (RHBZ#1138184). *) + let files = + List.filter (fun n -> String.find n "kdump" == -1) files in + (* If several files match, take the shortest match. This + * handles the case where we have a mix of same-version non-Xen + * and Xen kernels: + * initrd-2.6.18-308.el5.img + * initrd-2.6.18-308.el5xen.img + * and kernel 2.6.18-308.el5 (non-Xen) will match both + * (RHBZ#1141145). + *) + let cmp a b = compare (String.length a) (String.length b) in + let files = List.sort cmp files in + match files with + | [] -> + warning (f_"no initrd was found in /boot matching %s %s.") + name version; + None + | x :: _ -> Some ("/boot/" ^ x) in + + (* Get all modules, which might include custom-installed + * modules that don't appear in 'files' list above. + *) + let modules = g#find modpath in + let modules = Array.to_list modules in + let modules = + List.filter (fun m -> PCRE.matches rex_ko m) modules in + assert (List.length modules > 0); + + (* Determine the kernel architecture by looking at the + * architecture of a kernel module. + * + * To avoid architecture detection issues with 3rd party + * modules (RHBZ#1690574), try to pick one of the well + * known modules, if available. Otherwise, an arbitrary + * module is used. + *) + let arch = + (* Well known kernel modules. *) + let candidates = [ "virtio"; "kvm" ] in + let all_candidates = List.flatten ( + List.map ( + fun f -> + [ "/" ^ f ^ ".o"; + "/" ^ f ^ ".ko"; + "/" ^ f ^ ".ko.xz"; + "/" ^ f ^ ".ko.zst"; + ] + ) candidates + ) in + let candidate = + try + List.find ( + fun m -> + List.exists (String.is_suffix m) all_candidates + ) modules + with Not_found -> + (* No known module found, pick an arbitrary one + * (the first). + *) + List.hd modules in + let candidate = modpath ^ candidate in + g#file_architecture (g#realpath candidate) in + + (* Just return the module names, without path or extension. *) + let modules = List.filter_map ( + fun m -> + if PCRE.matches rex_ko_extract m then + Some (PCRE.sub 1) + else + None + ) modules in + assert (List.length modules > 0); + + let config_file = + let cfg = "/boot/config-" ^ version in + if g#is_file ~followsymlinks:true cfg then Some cfg + else None in + + let kernel_supports what kconf = + List.mem what modules || check_config kconf config_file in + + let supports_virtio_blk = + kernel_supports "virtio_blk" "VIRTIO_BLK" in + let supports_virtio_net = + kernel_supports "virtio_net" "VIRTIO_NET" in + let supports_virtio_rng = + kernel_supports "virtio-rng" "HW_RANDOM_VIRTIO" in + let supports_virtio_balloon = + kernel_supports "virtio_balloon" "VIRTIO_BALLOON" in + let supports_isa_pvpanic = + kernel_supports "pvpanic" "PVPANIC" in + let supports_virtio_socket = + kernel_supports "vmw_vsock_virtio_transport" "VIRTIO_VSOCKETS" in + let is_xen_pv_only_kernel = + check_config "X86_XEN" config_file || + check_config "X86_64_XEN" config_file in + + (* If the package name is like "kernel-debug", then it's + * a debug kernel. + *) + let is_debug = + String.is_suffix app.G.app2_name "-debug" || + String.is_suffix app.G.app2_name "-dbg" in + + Some { + ki_app = app; + ki_name = name; + ki_version = version; + ki_arch = arch; + ki_vmlinuz = vmlinuz; + ki_vmlinuz_stat = vmlinuz_stat; + ki_initrd = initrd; + ki_modpath = modpath; + ki_modules = modules; + ki_supports_virtio_blk = supports_virtio_blk; + ki_supports_virtio_net = supports_virtio_net; + ki_supports_virtio_rng = supports_virtio_rng; + ki_supports_virtio_balloon = supports_virtio_balloon; + ki_supports_isa_pvpanic = supports_isa_pvpanic; + ki_supports_virtio_socket = supports_virtio_socket; + ki_is_xen_pv_only_kernel = is_xen_pv_only_kernel; + ki_is_debug = is_debug; + ki_config_file = config_file; + } + + with Not_found -> None + ) + ) kernel_pkgs in + + if verbose () then ( + eprintf "installed kernel packages in this guest:\n"; + List.iter (print_kernel_info stderr "\t") installed_kernels; + flush stderr + ); + + if installed_kernels = [] then + error (f_"no installed kernel packages were found.\n\nThis probably indicates that %s was unable to inspect this guest properly.") + prog; + + (* Now the difficult bit. Get the bootloader kernels. The first in this + * list is the default booting kernel. + *) + let bootloader_kernels : kernel_info list = + let vmlinuzes = bootloader#list_kernels in + + (* Map these to installed kernels. *) + List.filter_map ( + fun vmlinuz -> + try + let statbuf = g#statns vmlinuz in + let kernel = + List.find ( + fun { ki_vmlinuz_stat = s } -> + statbuf.G.st_dev = s.G.st_dev && statbuf.G.st_ino = s.G.st_ino + ) installed_kernels in + Some kernel + with + | Not_found -> None + | G.Error msg as exn -> + (* If it isn't "no such file or directory", then re-raise it. *) + if g#last_errno () <> G.Errno.errno_ENOENT then raise exn; + warning (f_"ignoring kernel %s in bootloader, as it does not exist.") + vmlinuz; + None + ) vmlinuzes in + + if verbose () then ( + eprintf "kernels offered by the bootloader in this guest (first in list is default):\n"; + List.iter (print_kernel_info stderr "\t") bootloader_kernels; + flush stderr + ); + + if bootloader_kernels = [] then + error (f_"no kernels were found in the bootloader configuration.\n\nThis probably indicates that %s was unable to parse the bootloader configuration of this guest.") + prog; + + bootloader_kernels diff --git a/common/mldrivers/linux_kernels.mli b/common/mldrivers/linux_kernels.mli new file mode 100644 index 0000000..0dfd504 --- /dev/null +++ b/common/mldrivers/linux_kernels.mli @@ -0,0 +1,57 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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. + *) + +(** Detect which kernels are installed and offered by the bootloader. *) + +type kernel_info = { + ki_app : Guestfs.application2; (** The RPM package data. *) + ki_name : string; (** eg. "kernel-PAE" *) + ki_version : string; (** version-release *) + ki_arch : string; (** Kernel architecture. *) + ki_vmlinuz : string; (** The path of the vmlinuz file. *) + ki_vmlinuz_stat : Guestfs.statns;(** stat(2) of vmlinuz *) + ki_initrd : string option; (** Path of initramfs, if found. *) + ki_modpath : string; (** The module path. *) + ki_modules : string list; (** The list of module names. *) + ki_supports_virtio_blk : bool; (** Kernel supports virtio-blk? *) + ki_supports_virtio_net : bool; (** Kernel supports virtio-net? *) + ki_supports_virtio_rng : bool; (** Kernel supports virtio-rng? *) + ki_supports_virtio_balloon : bool; (** Kernel supports memory balloon? *) + ki_supports_isa_pvpanic : bool; (** Kernel supports ISA pvpanic device? *) + ki_supports_virtio_socket : bool; (** Kernel supports virtio-socket? *) + ki_is_xen_pv_only_kernel : bool; (** Is a Xen paravirt-only kernel? *) + ki_is_debug : bool; (** Is debug kernel? *) + ki_config_file : string option; (** Path of config file, if found. *) +} +(** Kernel information. *) + +val detect_kernels : Guestfs.guestfs -> string -> + Linux_bootloaders.bootloader -> + Guestfs.application2 list -> + kernel_info list +(** [detect_kernels g root bootloader apps] detects the kernels offered + by the Linux bootloader (eg. grub). + + It will only return the intersection of kernels that are + installed and kernels that the bootloader knows about. The + first kernel in the returned list is the default boot option, + ie. what the guest would boot without interaction or overrides. *) + +val print_kernel_info : out_channel -> string -> kernel_info -> unit +(** Print a kernel_info struct to the given output channel. The + second parameter is a prefix for indentation etc. *) diff --git a/common/mldrivers/windows_drivers.ml b/common/mldrivers/windows_drivers.ml new file mode 100644 index 0000000..3e0730c --- /dev/null +++ b/common/mldrivers/windows_drivers.ml @@ -0,0 +1,261 @@ +(* virt-drivers + * Copyright (C) 2009-2023 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. + *) + +(* Detect which drivers are installed in the Windows Registry. *) + +open Printf +open Scanf + +open Std_utils +open Tools_utils +open Common_gettext.Gettext + +module G = Guestfs + +type driver = { + name : string; (** Driver name, eg. ["usbport"] *) + hwassoc : hardware list; (** Associated list of hardware *) +} +and hardware = +| PCI of pci_device +| HID of hid_device +| USB of usb_device +| Other of string list (** Anything that could not be parsed. *) +and pci_device = { + pci_class : int64 option; + pci_vendor : int64 option; + pci_device : int64 option; + pci_subsys : int64 option; + pci_rev : int64 option; +} +and hid_device = { + hid_vendor : int64 option; + hid_product : int64 option; + hid_rev : int64 option; + hid_col : int64 option; + hid_multi : int64 option; +} +and usb_device = { + usb_vendor : int64 option; + usb_product : int64 option; + usb_rev : int64 option; + usb_multi : int64 option; +} + +let re_inf = PCRE.compile ~caseless:true "^(.*)\\.inf$" + +let re_pci_cc = PCRE.compile ~caseless:true "^cc_([[:xdigit:]]{4,6})$" +let re_pci_ven = PCRE.compile ~caseless:true "^ven_([[:xdigit:]]{4})$" +let re_pci_dev = PCRE.compile ~caseless:true "^dev_([[:xdigit:]]{4})$" +let re_pci_subsys = PCRE.compile ~caseless:true "^subsys_([[:xdigit:]]{8})$" +let re_pci_rev = PCRE.compile ~caseless:true "^rev_([[:xdigit:]]{2})$" + +let re_hid_vid = PCRE.compile ~caseless:true "^vid_([[:xdigit:]]{4})$" +let re_hid_pid = PCRE.compile ~caseless:true "^pid_([[:xdigit:]]{4})$" +let re_hid_rev = PCRE.compile ~caseless:true "^rev_([[:xdigit:]]{2})$" +let re_hid_col = PCRE.compile ~caseless:true "^col([[:xdigit:]]{2})$" +let re_hid_multi = PCRE.compile ~caseless:true "^mi_([[:xdigit:]]{2})$" + +let re_usb_vid = PCRE.compile ~caseless:true "^vid_([[:xdigit:]]{4})$" +let re_usb_pid = PCRE.compile ~caseless:true "^pid_([[:xdigit:]]{4})$" +let re_usb_rev = PCRE.compile ~caseless:true "^rev_([[:xdigit:]]{2})$" +let re_usb_multi = PCRE.compile ~caseless:true "^mi_([[:xdigit:]]{2})$" + +let rec detect_drivers (g : G.guestfs) root = + assert (g#inspect_get_type root = "windows"); + + let windows_system_hive = g#inspect_get_windows_system_hive root in + let drivers = + Registry.with_hive_readonly g windows_system_hive ( + fun reg -> + let path = [ "DriverDatabase"; "DeviceIds" ] in + let deviceids_node = + match Registry.get_node reg path with + | Some node -> node + | None -> + error (f_"could not find registry entry \ + HKEY_LOCAL_MACHINE\\SYSTEM\\DriverDatabase\\DeviceIds \ + in this Windows guest. It may be either a very old \ + or very new version of Windows \ + that we cannot process.") in + + (* inf_name path node *) + let children : (string * (string list * int64)) list = + get_inf_nodes reg deviceids_node in + + let children = + List.map (fun (name, (path, node)) -> + String.lowercase_ascii name, (path, node)) children in + + (* Group by inf_name. *) + let children = List.sort compare children in + let children : (string * (string list * int64) list) list= + List.group_by children in + + (* Convert to a final list of drivers. *) + List.map ( + fun (inf_name, hwassoc) -> + let hwassoc = List.map path_to_hardware hwassoc in + { name = inf_name; hwassoc } + ) children + ) in + drivers + +(* Find recursively all child nodes containing a key + * ".inf" = hex(3):01,ff,00,00 + * + * Returns the list of [inf_name * (path * node)] where + * [inf_name] is the part of ".inf", + * [path] is the list of strings (node names) leading to this node, + * [node] is the hivex node number of the child node. + *) +and get_inf_nodes reg root = + let nodes : (string list * int64) list = find_all_nodes reg root in + List.filter_map ( + fun (path, h) -> + match is_inf_node reg h with + | None -> None + | Some inf_name -> Some (inf_name, (path, h)) + ) nodes + +and find_all_nodes ((g, _) as reg) node = + (* Find all children of [node]. *) + let children = g#hivex_node_children node in + let children = Array.to_list children in + let children = + List.map (fun { G.hivex_node_h = h } -> [ g#hivex_node_name h ], h) + children in + + (* Add any grandchild nodes below these children. *) + let grandchildren = + List.map ( + fun (child_path, child) -> + let nodes = find_all_nodes reg child in + (* Need to prefix the path returned with the child path. *) + List.map (fun (path, h) -> child_path @ path, h) nodes + ) children in + + children @ List.flatten grandchildren + +(* Does any value under the node satisfy is_inf_value below? *) +and is_inf_node ((g, _) as reg) h = + (* Get the values in the registry key. *) + let values = g#hivex_node_values h in + let values = Array.to_list values in + let rec loop = function + | [] -> None + | { G.hivex_value_h = v } :: values -> + match is_inf_value reg v with + | None -> loop values + | Some inf_name -> Some inf_name + in + loop values + +(* Does the key name end in ".inf" (case insensitive), and have + * an associated value which is data type 3, value 01 ff 00 00? + * Returns None if no, or Some name if yes. + *) +and is_inf_value (g, _) v = + let typ = g#hivex_value_type v in + if typ <> 3L then None + else ( + let key = g#hivex_value_key v in + if not (PCRE.matches re_inf key) then None + else ( + let data = g#hivex_value_value v in + if data <> "\001\xff\000\000" then None + else Some (PCRE.sub 1) (* Return name of .inf file from re_inf above. *) + ) + ) + +(* Convert the \DeviceIds\... path to a hardware type, where possible. *) +and path_to_hardware (path, _) = + match path with + | pci :: path when String.lowercase_ascii pci = "pci" -> + pci_to_hardware path + | hid :: path when String.lowercase_ascii hid = "hid" -> + hid_to_hardware path + | usb :: path when String.lowercase_ascii usb = "usb" -> + usb_to_hardware path + | _ -> Other path + +and pci_to_hardware = function + | keys :: _ -> + let keys = String.nsplit "&" keys in + let empty = { pci_class = None; pci_vendor = None; pci_device = None; + pci_subsys = None; pci_rev = None } in + let f pci key = + if PCRE.matches re_pci_cc key then + { pci with pci_class = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_pci_ven key then + { pci with pci_vendor = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_pci_dev key then + { pci with pci_device = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_pci_subsys key then + { pci with pci_subsys = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_pci_rev key then + { pci with pci_rev = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else + pci + in + PCI (List.fold_left f empty keys) + | path -> Other ("PCI" :: path) + +and hid_to_hardware = function + | keys :: _ -> + let keys = String.nsplit "&" keys in + let empty = { hid_vendor = None; hid_product = None; + hid_rev = None; hid_col = None; hid_multi = None } in + let f hid key = + if PCRE.matches re_hid_vid key then + { hid with hid_vendor = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_hid_pid key then + { hid with hid_product = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_hid_rev key then + { hid with hid_rev = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_hid_col key then + { hid with hid_col = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_hid_multi key then + { hid with hid_multi = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else + hid + in + HID (List.fold_left f empty keys) + + | path -> Other ("HID" :: path) + +and usb_to_hardware = function + | keys :: _ -> + let keys = String.nsplit "&" keys in + let empty = { usb_vendor = None; usb_product = None; + usb_rev = None; usb_multi = None } in + let f usb key = + if PCRE.matches re_usb_vid key then + { usb with usb_vendor = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_usb_pid key then + { usb with usb_product = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_usb_rev key then + { usb with usb_rev = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else if PCRE.matches re_usb_multi key then + { usb with usb_multi = Some (sscanf (PCRE.sub 1) "%Lx" identity) } + else + usb + in + USB (List.fold_left f empty keys) + + | path -> Other ("USB" :: path) diff --git a/common/mldrivers/windows_drivers.mli b/common/mldrivers/windows_drivers.mli new file mode 100644 index 0000000..057a798 --- /dev/null +++ b/common/mldrivers/windows_drivers.mli @@ -0,0 +1,58 @@ +(* virt-drivers + * Copyright (C) 2009-2023 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. + *) + +(** Detect which drivers are installed in the Windows Registry. *) + +type driver = { + name : string; (** Driver name, eg. ["usbport"] *) + hwassoc : hardware list; (** Associated list of hardware *) +} +and hardware = +| PCI of pci_device +| HID of hid_device +| USB of usb_device +| Other of string list (** Anything that could not be parsed. *) +and pci_device = { + pci_class : int64 option; + pci_vendor : int64 option; + pci_device : int64 option; + pci_subsys : int64 option; + pci_rev : int64 option; +} +and hid_device = { + hid_vendor : int64 option; + hid_product : int64 option; + hid_rev : int64 option; + hid_col : int64 option; + hid_multi : int64 option; +} +and usb_device = { + usb_vendor : int64 option; + usb_product : int64 option; + usb_rev : int64 option; + usb_multi : int64 option; +} + +val detect_drivers : Guestfs.guestfs -> string -> driver list +(** [detect_kernels g root] detects the drivers installed in + the Windows guest, returning their names and the hardware + associations. + + The information is retrieved from the + [HKEY_LOCAL_MACHINE\SYSTEM\DriverDatabase\DeviceIds\] + key in the system registry. *) diff --git a/common/mlgettext/Makefile.in b/common/mlgettext/Makefile.in index e71f08c..c3e1925 100644 --- a/common/mlgettext/Makefile.in +++ b/common/mlgettext/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -278,7 +278,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -307,6 +306,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -377,6 +378,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/mlpcre/Makefile.in b/common/mlpcre/Makefile.in index 0d7a136..56935af 100644 --- a/common/mlpcre/Makefile.in +++ b/common/mlpcre/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -487,7 +487,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -516,6 +515,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -586,6 +587,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/mlpcre/PCRE.ml b/common/mlpcre/PCRE.ml index 33074af..077290e 100644 --- a/common/mlpcre/PCRE.ml +++ b/common/mlpcre/PCRE.ml @@ -22,7 +22,7 @@ exception Error of string * int type regexp -external compile : ?anchored:bool -> ?caseless:bool -> ?dotall:bool -> ?extended:bool -> ?multiline:bool -> string -> regexp = "guestfs_int_pcre_compile_byte" "guestfs_int_pcre_compile" +external compile : ?caseless:bool -> ?dotall:bool -> ?extended:bool -> ?multiline:bool -> string -> regexp = "guestfs_int_pcre_compile" external matches : ?offset:int -> regexp -> string -> bool = "guestfs_int_pcre_matches" external sub : int -> string = "guestfs_int_pcre_sub" external subi : int -> int * int = "guestfs_int_pcre_subi" diff --git a/common/mlpcre/PCRE.mli b/common/mlpcre/PCRE.mli index b59a3d1..b69a56b 100644 --- a/common/mlpcre/PCRE.mli +++ b/common/mlpcre/PCRE.mli @@ -52,13 +52,12 @@ exception Error of string * int type regexp (** The type of a compiled regular expression. *) -val compile : ?anchored:bool -> ?caseless:bool -> ?dotall:bool -> ?extended:bool -> ?multiline:bool -> string -> regexp +val compile : ?caseless:bool -> ?dotall:bool -> ?extended:bool -> ?multiline:bool -> string -> regexp (** Compile a regular expression. This can raise {!Error}. - The flags [?anchored], [?caseless], [?dotall], [?extended], - [?multiline] - correspond to the [pcre_compile] flags [PCRE_ANCHORED] etc. - See pcreapi(3) for details of what they do. + The flags [?caseless], [?dotall], [?extended], [?multiline] + correspond to the [pcre_compile] flags [PCRE_CASELESS] etc. + See pcre2api(3) for details of what they do. All flags default to false. *) val matches : ?offset:int -> regexp -> string -> bool @@ -95,7 +94,7 @@ val subi : int -> int * int of the first character of the substring and the first character after the substring. - (See pcreapi(3) section "How pcre_exec() returns captured substrings" + (See pcre2api(3) section "How pcre_exec() returns captured substrings" for exact details). If there was no nth substring then this raises [Not_found]. *) diff --git a/common/mlpcre/pcre-c.c b/common/mlpcre/pcre-c.c index f780832..ad9c6d1 100644 --- a/common/mlpcre/pcre-c.c +++ b/common/mlpcre/pcre-c.c @@ -167,11 +167,11 @@ Optint_val (value intv, int defval) } value -guestfs_int_pcre_compile (value anchoredv, value caselessv, value dotallv, +guestfs_int_pcre_compile (value caselessv, value dotallv, value extendedv, value multilinev, value pattv) { - CAMLparam5 (anchoredv, caselessv, dotallv, extendedv, multilinev); + CAMLparam4 (caselessv, dotallv, extendedv, multilinev); CAMLxparam1 (pattv); const char *patt; int options = 0; @@ -180,8 +180,6 @@ guestfs_int_pcre_compile (value anchoredv, value caselessv, value dotallv, PCRE2_SIZE errnum; /* Flag parameters are all ‘bool option’, defaulting to false. */ - if (is_Some_true (anchoredv)) - options |= PCRE2_ANCHORED; if (is_Some_true (caselessv)) options |= PCRE2_CASELESS; if (is_Some_true (dotallv)) @@ -201,16 +199,6 @@ guestfs_int_pcre_compile (value anchoredv, value caselessv, value dotallv, CAMLreturn (Val_regexp (re)); } -/* OCaml calls C functions from bytecode a bit differently when they - * have more than 5 parameters. - */ -value -guestfs_int_pcre_compile_byte (value *argv, int argn) -{ - return guestfs_int_pcre_compile (argv[0], argv[1], argv[2], argv[3], argv[4], - argv[5]); -} - value guestfs_int_pcre_matches (value offsetv, value rev, value strv) { @@ -278,7 +266,6 @@ guestfs_int_pcre_sub (value nv) CAMLparam1 (nv); const int n = Int_val (nv); CAMLlocal1 (strv); - CLEANUP_FREE char *str = NULL; const struct last_match *m = pthread_getspecific (last_match); PCRE2_SIZE len; int r; diff --git a/common/mlpcre/pcre_tests.ml b/common/mlpcre/pcre_tests.ml index 8790438..dad8bd9 100644 --- a/common/mlpcre/pcre_tests.ml +++ b/common/mlpcre/pcre_tests.ml @@ -18,17 +18,16 @@ open Printf -let compile ?(anchored = false) ?(caseless = false) - ?(dotall = false) ?(extended = false) ?(multiline = false) +let compile ?(caseless = false) ?(dotall = false) + ?(extended = false) ?(multiline = false) patt = - eprintf "PCRE.compile%s%s%s%s%s %s\n%!" - (if anchored then " ~anchored:true" else "") + eprintf "PCRE.compile%s%s%s%s %s\n%!" (if caseless then " ~caseless:true" else "") (if dotall then " ~dotall:true" else "") (if extended then " ~extended:true" else "") (if multiline then " ~multiline:true" else "") patt; - PCRE.compile ~anchored ~caseless ~dotall ~extended ~multiline patt + PCRE.compile ~caseless ~dotall ~extended ~multiline patt let matches ?(offset = 0) re str = eprintf "PCRE.matches %s, %d ->%!" str offset; diff --git a/common/mlprogress/Makefile.in b/common/mlprogress/Makefile.in index d174778..bd8d0db 100644 --- a/common/mlprogress/Makefile.in +++ b/common/mlprogress/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -277,7 +277,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -306,6 +305,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -376,6 +377,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/mlprogress/progress.mli b/common/mlprogress/progress.mli index a9b3d37..7876291 100644 --- a/common/mlprogress/progress.mli +++ b/common/mlprogress/progress.mli @@ -1,5 +1,5 @@ (* virt-resize - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 diff --git a/common/mlstdutils/Makefile.in b/common/mlstdutils/Makefile.in index 3a48d57..741b01a 100644 --- a/common/mlstdutils/Makefile.in +++ b/common/mlstdutils/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -491,7 +491,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -520,6 +519,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -590,6 +591,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml index 1a0cc57..ab6e71c 100644 --- a/common/mlstdutils/std_utils.ml +++ b/common/mlstdutils/std_utils.ml @@ -301,6 +301,15 @@ module List = struct | Some y -> y | None -> find_map f xs + let rec group_by = function + | [] -> [] + | (day1, x1) :: (day2, x2) :: rest when day1 = day2 -> + let rest = group_by ((day2, x2) :: rest) in + let day, xs = List.hd rest in + (day, x1 :: xs) :: List.tl rest + | (day, x) :: rest -> + (day, [x]) :: group_by rest + let rec combine3 xs ys zs = match xs, ys, zs with | [], [], [] -> [] @@ -349,6 +358,11 @@ module List = struct xsp := xs; x + let may_push_back xsp x = + match x with None -> () | Some x -> push_back xsp x + let may_push_front x xsp = + match x with None -> () | Some x -> push_front x xsp + let push_back_list xsp xs = xsp := !xsp @ xs let push_front_list xs xsp = xsp := xs @ !xsp end diff --git a/common/mlstdutils/std_utils.mli b/common/mlstdutils/std_utils.mli index d568c01..782d8fd 100644 --- a/common/mlstdutils/std_utils.mli +++ b/common/mlstdutils/std_utils.mli @@ -201,6 +201,12 @@ module List : sig [f x] returns [Some y]. It returns [y]. If we exhaust the list then this raises [Not_found]. *) + val group_by : ('a * 'b) list -> ('a * 'b list) list + (** [group_by [1, "foo"; 2, "bar"; 2, "baz"; 2, "biz"; 3, "boo"; 4, "fizz"]] + - : (int * string list) list + [(1, ["foo"]); (2, ["bar"; "baz"; "biz"]); (3, ["boo"]); (4, ["fizz"])] + *) + val combine3 : 'a list -> 'b list -> 'c list -> ('a * 'b * 'c) list (** Like {!List.combine} but for triples. All lists must be the same length. *) @@ -246,6 +252,18 @@ module List : sig If a zero-length list is passed in, this raises [Failure "pop_front"]. *) + val may_push_back : 'a list ref -> 'a option -> unit + val may_push_front : 'a option -> 'a list ref -> unit + (** More imperative list manipulation functions. + + [may_push_back xsp None] does nothing. + + [may_push_back xsp (Some x)] appends [x] to the end of the list. + + [may_push_front None xsp] does nothing. + + [may_push_front (Some x) xsp] prepends [x] to the head of the list. *) + val push_back_list : 'a list ref -> 'a list -> unit val push_front_list : 'a list -> 'a list ref -> unit (** More imperative list manipulation functions. diff --git a/common/mltools/DOM.ml b/common/mltools/DOM.ml new file mode 100644 index 0000000..1a97072 --- /dev/null +++ b/common/mltools/DOM.ml @@ -0,0 +1,171 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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. + *) + +(* Poor man's XML DOM, mutable for ease of modification. *) + +open Std_utils +open Tools_utils + +open Printf + +type node = + | PCData of string + | Comment of string + | Element of element +and element = { + e_name : string; (* Name of element. *) + mutable e_attrs : attr list; (* Attributes. *) + mutable e_children : node list; (* Child elements. *) +} +and attr = string * string +and doc = Doc of element + +let doc name attrs children = + Doc { e_name = name; e_attrs = attrs; e_children = children } + +let e name attrs children = + Element { e_name = name; e_attrs = attrs; e_children = children } + +(* This outputs nicely formatted and indented XML, ie. with lots of + * whitespace. As far as I know this is safe for the kind of documents + * we will be writing, ie. libvirt XML and OVF metadata, where + * whitespace is generally not significant, but readability is useful. + *) +let rec node_to_buf ?(indent = 0) buf = function + | PCData str -> + Buffer.add_string buf (xml_quote_pcdata str) + | Comment str -> + buffer_add_spaces buf indent; + bprintf buf "" (xml_quote_pcdata str) + | Element e -> + element_to_buf ~indent buf e +and element_to_buf ?(indent = 0) buf + { e_name = name; e_attrs = attrs; e_children = children } = + buffer_add_spaces buf indent; + bprintf buf "<%s" name; + List.iter (fun (n, v) -> bprintf buf " %s='%s'" n (xml_quote_attr v)) attrs; + if children <> [] then ( + Buffer.add_string buf ">"; + let last_child_was_element = ref false in + List.iter ( + function + | Element _ as child -> + last_child_was_element := true; + Buffer.add_char buf '\n'; + node_to_buf ~indent:(indent+2) buf child; + | PCData _ as child -> + last_child_was_element := false; + node_to_buf ~indent:(indent+2) buf child; + | Comment _ as child -> + last_child_was_element := true; + Buffer.add_char buf '\n'; + node_to_buf ~indent:(indent+2) buf child; + ) children; + if !last_child_was_element then ( + Buffer.add_char buf '\n'; + buffer_add_spaces buf indent + ); + bprintf buf "" name + ) else ( + Buffer.add_string buf "/>" + ) + +and buffer_add_spaces buf n = + Buffer.add_string buf (String.spaces n) + +(* Quote XML content. Note you must use single + * quotes around the attribute. + *) +and xml_quote_attr str = + let str = String.replace str "&" "&" in + let str = String.replace str "'" "'" in + let str = String.replace str "<" "<" in + let str = String.replace str ">" ">" in + str + +and xml_quote_pcdata str = + let str = String.replace str "&" "&" in + let str = String.replace str "<" "<" in + let str = String.replace str ">" ">" in + str + +let doc_to_buf buf (Doc doc) = + bprintf buf "\n"; + element_to_buf buf doc; + bprintf buf "\n" + +let doc_to_string doc = + let buf = Buffer.create 4096 in + doc_to_buf buf doc; + Buffer.contents buf + +let doc_to_chan chan doc = + let buf = Buffer.create 4096 in + doc_to_buf buf doc; + Buffer.output_buffer chan buf + +let path_to_nodes (Doc doc) path = + match path with + | [] -> invalid_arg "path_to_nodes: empty path" + | top_name :: path -> + if doc.e_name <> top_name then [] + else ( + let rec loop nodes path = + match path with + | [] -> [] + | [p] -> + List.filter ( + function + | PCData _ -> false + | Comment _ -> false + | Element e when e.e_name = p -> true + | Element _ -> false + ) nodes + | p :: ps -> + let children = + List.filter_map ( + function + | PCData _ -> None + | Comment _ -> None + | Element e when e.e_name = p -> Some e.e_children + | Element _ -> None + ) nodes in + List.concat (List.map (fun nodes -> loop nodes ps) children) + in + loop doc.e_children path + ) + +let filter_node_list_by_attr nodes attr = + List.filter ( + function + | Element { e_attrs = attrs } when List.mem attr attrs -> true + | Element _ | PCData _ | Comment _ -> false + ) nodes + +let find_node_by_attr nodes attr = + match filter_node_list_by_attr nodes attr with + | [] -> raise Not_found + | x::_ -> x + +let append_attr attr = function + | PCData _ | Comment _ -> invalid_arg "append_attr" + | Element e -> e.e_attrs <- e.e_attrs @ [attr] + +let append_child child = function + | PCData _ | Comment _ -> invalid_arg "append_child" + | Element e -> e.e_children <- e.e_children @ [child] diff --git a/common/mltools/DOM.mli b/common/mltools/DOM.mli new file mode 100644 index 0000000..ba505b5 --- /dev/null +++ b/common/mltools/DOM.mli @@ -0,0 +1,92 @@ +(* virt-v2v + * Copyright (C) 2009-2023 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. + *) + +(** Poor man's XML DOM, mutable for ease of modification. *) + +type element +type doc = Doc of element +type attr = string * string + +type node = + | PCData of string (** Text. *) + | Comment of string (** *) + | Element of element (** with attrs and children *) + +val doc : string -> attr list -> node list -> doc +(** A quick way to create a document. *) + +val e : string -> attr list -> node list -> node +(** A quick way to create elements. + + Typical use is: +{v + e "foo" [] [ + e "bar" [] [] + e "baz" [ "a", "b"; "c", "d"] [] + ] +v} + which creates the following OCaml tree structure: +{v + Element { + e_name = "foo"; + e_attrs = []; + e_children = [ + Element { e_name = "bar"; ... }; + Element { e_name = "baz"; e_attrs = [ "a", "b"; "c", "d" ]; ... }; + ] + } +v} + which corresponds to the following XML: +{v + + + + +v} +*) + +val doc_to_string : doc -> string +(** Convert a document to a string representation. *) + +val doc_to_chan : out_channel -> doc -> unit +(** Write the XML document to an output channel. *) + +val path_to_nodes : doc -> string list -> node list +(** Search down the path and return a list of all matching elements. + Returns an empty list if none were found. *) + +val filter_node_list_by_attr : node list -> attr -> node list +(** Find DOM elements which have a particular attribute name=value (not + recursively). If not found, returns an empty list. *) + +val find_node_by_attr : node list -> attr -> node +(** Find the first DOM element which has a particular attribute + name=value (not recursively). If not found, raises + [Not_found]. *) + +val append_attr : attr -> node -> unit +(** [element] must be an [Element _] node. [append_attr attr element] + appends [attr] to the attributes of [element]. + + This mutates [element]. *) + +val append_child : node -> node -> unit +(** [element] must be an [Element _] node. [append_child child + element] appends [child] to the children of [element]. + + This mutates [element]. *) diff --git a/common/mltools/Makefile.am b/common/mltools/Makefile.am index 24167bc..f510a67 100644 --- a/common/mltools/Makefile.am +++ b/common/mltools/Makefile.am @@ -35,9 +35,12 @@ EXTRA_DIST = \ SOURCES_MLI = \ checksums.mli \ curl.mli \ + DOM.mli \ getopt.mli \ JSON.mli \ JSON_parser.mli \ + libosinfo.mli \ + libosinfo_utils.mli \ on_exit.mli \ planner.mli \ regedit.mli \ @@ -51,6 +54,7 @@ SOURCES_ML = \ getopt.ml \ JSON.ml \ tools_utils.ml \ + DOM.ml \ on_exit.ml \ URI.ml \ planner.ml \ @@ -60,7 +64,9 @@ SOURCES_ML = \ curl.ml \ checksums.ml \ xpath_helpers.ml \ - urandom.ml + urandom.ml \ + libosinfo.ml \ + libosinfo_utils.ml SOURCES_C = \ ../options/decrypt.c \ @@ -68,6 +74,7 @@ SOURCES_C = \ ../options/uri.c \ getopt-c.c \ JSON_parser-c.c \ + libosinfo-c.c \ tools_utils-c.c \ uri-c.c @@ -110,6 +117,7 @@ libmltools_a_CFLAGS = \ $(LIBXML2_CFLAGS) \ $(LIBGUESTFS_CFLAGS) \ $(JANSSON_CFLAGS) \ + $(LIBOSINFO_CFLAGS) \ -fPIC BOBJECTS = $(SOURCES_ML:.ml=.cmo) @@ -141,6 +149,7 @@ OCAMLCLIBS = \ $(LIBVIRT_LIBS) \ $(LIBXML2_LIBS) \ $(JANSSON_LIBS) \ + $(LIBOSINFO_LIBS) \ $(LIBINTL) \ -lgnu diff --git a/common/mltools/Makefile.in b/common/mltools/Makefile.in index 0faed6d..913c1fa 100644 --- a/common/mltools/Makefile.in +++ b/common/mltools/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -190,14 +190,15 @@ am__v_AR_1 = libmltools_a_AR = $(AR) $(ARFLAGS) libmltools_a_LIBADD = am__libmltools_a_SOURCES_DIST = ../options/decrypt.c ../options/keys.c \ - ../options/uri.c getopt-c.c JSON_parser-c.c tools_utils-c.c \ - uri-c.c + ../options/uri.c getopt-c.c JSON_parser-c.c libosinfo-c.c \ + tools_utils-c.c uri-c.c am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = ../options/libmltools_a-decrypt.$(OBJEXT) \ ../options/libmltools_a-keys.$(OBJEXT) \ ../options/libmltools_a-uri.$(OBJEXT) \ libmltools_a-getopt-c.$(OBJEXT) \ libmltools_a-JSON_parser-c.$(OBJEXT) \ + libmltools_a-libosinfo-c.$(OBJEXT) \ libmltools_a-tools_utils-c.$(OBJEXT) \ libmltools_a-uri-c.$(OBJEXT) @HAVE_OCAML_TRUE@am_libmltools_a_OBJECTS = $(am__objects_1) @@ -253,6 +254,7 @@ am__depfiles_remade = ../options/$(DEPDIR)/libmltools_a-decrypt.Po \ ./$(DEPDIR)/getopt_tests-dummy.Po \ ./$(DEPDIR)/libmltools_a-JSON_parser-c.Po \ ./$(DEPDIR)/libmltools_a-getopt-c.Po \ + ./$(DEPDIR)/libmltools_a-libosinfo-c.Po \ ./$(DEPDIR)/libmltools_a-tools_utils-c.Po \ ./$(DEPDIR)/libmltools_a-uri-c.Po \ ./$(DEPDIR)/machine_readable_tests-dummy.Po \ @@ -555,7 +557,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -584,6 +585,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -654,6 +657,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -812,9 +816,12 @@ EXTRA_DIST = \ SOURCES_MLI = \ checksums.mli \ curl.mli \ + DOM.mli \ getopt.mli \ JSON.mli \ JSON_parser.mli \ + libosinfo.mli \ + libosinfo_utils.mli \ on_exit.mli \ planner.mli \ regedit.mli \ @@ -828,6 +835,7 @@ SOURCES_ML = \ getopt.ml \ JSON.ml \ tools_utils.ml \ + DOM.ml \ on_exit.ml \ URI.ml \ planner.ml \ @@ -837,7 +845,9 @@ SOURCES_ML = \ curl.ml \ checksums.ml \ xpath_helpers.ml \ - urandom.ml + urandom.ml \ + libosinfo.ml \ + libosinfo_utils.ml SOURCES_C = \ ../options/decrypt.c \ @@ -845,6 +855,7 @@ SOURCES_C = \ ../options/uri.c \ getopt-c.c \ JSON_parser-c.c \ + libosinfo-c.c \ tools_utils-c.c \ uri-c.c @@ -880,6 +891,7 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@ $(LIBXML2_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBGUESTFS_CFLAGS) \ @HAVE_OCAML_TRUE@ $(JANSSON_CFLAGS) \ +@HAVE_OCAML_TRUE@ $(LIBOSINFO_CFLAGS) \ @HAVE_OCAML_TRUE@ -fPIC @HAVE_OCAML_TRUE@BOBJECTS = $(SOURCES_ML:.ml=.cmo) @@ -902,6 +914,7 @@ SOURCES_C = \ @HAVE_OCAML_TRUE@ $(LIBVIRT_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ @HAVE_OCAML_TRUE@ $(JANSSON_LIBS) \ +@HAVE_OCAML_TRUE@ $(LIBOSINFO_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBINTL) \ @HAVE_OCAML_TRUE@ -lgnu @@ -1191,6 +1204,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt_tests-dummy.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmltools_a-JSON_parser-c.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmltools_a-getopt-c.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmltools_a-libosinfo-c.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmltools_a-tools_utils-c.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmltools_a-uri-c.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machine_readable_tests-dummy.Po@am__quote@ # am--include-marker @@ -1297,6 +1311,20 @@ libmltools_a-JSON_parser-c.obj: JSON_parser-c.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmltools_a_CPPFLAGS) $(CPPFLAGS) $(libmltools_a_CFLAGS) $(CFLAGS) -c -o libmltools_a-JSON_parser-c.obj `if test -f 'JSON_parser-c.c'; then $(CYGPATH_W) 'JSON_parser-c.c'; else $(CYGPATH_W) '$(srcdir)/JSON_parser-c.c'; fi` +libmltools_a-libosinfo-c.o: libosinfo-c.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmltools_a_CPPFLAGS) $(CPPFLAGS) $(libmltools_a_CFLAGS) $(CFLAGS) -MT libmltools_a-libosinfo-c.o -MD -MP -MF $(DEPDIR)/libmltools_a-libosinfo-c.Tpo -c -o libmltools_a-libosinfo-c.o `test -f 'libosinfo-c.c' || echo '$(srcdir)/'`libosinfo-c.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmltools_a-libosinfo-c.Tpo $(DEPDIR)/libmltools_a-libosinfo-c.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libosinfo-c.c' object='libmltools_a-libosinfo-c.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmltools_a_CPPFLAGS) $(CPPFLAGS) $(libmltools_a_CFLAGS) $(CFLAGS) -c -o libmltools_a-libosinfo-c.o `test -f 'libosinfo-c.c' || echo '$(srcdir)/'`libosinfo-c.c + +libmltools_a-libosinfo-c.obj: libosinfo-c.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmltools_a_CPPFLAGS) $(CPPFLAGS) $(libmltools_a_CFLAGS) $(CFLAGS) -MT libmltools_a-libosinfo-c.obj -MD -MP -MF $(DEPDIR)/libmltools_a-libosinfo-c.Tpo -c -o libmltools_a-libosinfo-c.obj `if test -f 'libosinfo-c.c'; then $(CYGPATH_W) 'libosinfo-c.c'; else $(CYGPATH_W) '$(srcdir)/libosinfo-c.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmltools_a-libosinfo-c.Tpo $(DEPDIR)/libmltools_a-libosinfo-c.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libosinfo-c.c' object='libmltools_a-libosinfo-c.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmltools_a_CPPFLAGS) $(CPPFLAGS) $(libmltools_a_CFLAGS) $(CFLAGS) -c -o libmltools_a-libosinfo-c.obj `if test -f 'libosinfo-c.c'; then $(CYGPATH_W) 'libosinfo-c.c'; else $(CYGPATH_W) '$(srcdir)/libosinfo-c.c'; fi` + libmltools_a-tools_utils-c.o: tools_utils-c.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmltools_a_CPPFLAGS) $(CPPFLAGS) $(libmltools_a_CFLAGS) $(CFLAGS) -MT libmltools_a-tools_utils-c.o -MD -MP -MF $(DEPDIR)/libmltools_a-tools_utils-c.Tpo -c -o libmltools_a-tools_utils-c.o `test -f 'tools_utils-c.c' || echo '$(srcdir)/'`tools_utils-c.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmltools_a-tools_utils-c.Tpo $(DEPDIR)/libmltools_a-tools_utils-c.Po @@ -1740,6 +1768,7 @@ distclean: distclean-am -rm -f ./$(DEPDIR)/getopt_tests-dummy.Po -rm -f ./$(DEPDIR)/libmltools_a-JSON_parser-c.Po -rm -f ./$(DEPDIR)/libmltools_a-getopt-c.Po + -rm -f ./$(DEPDIR)/libmltools_a-libosinfo-c.Po -rm -f ./$(DEPDIR)/libmltools_a-tools_utils-c.Po -rm -f ./$(DEPDIR)/libmltools_a-uri-c.Po -rm -f ./$(DEPDIR)/machine_readable_tests-dummy.Po @@ -1798,6 +1827,7 @@ maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/getopt_tests-dummy.Po -rm -f ./$(DEPDIR)/libmltools_a-JSON_parser-c.Po -rm -f ./$(DEPDIR)/libmltools_a-getopt-c.Po + -rm -f ./$(DEPDIR)/libmltools_a-libosinfo-c.Po -rm -f ./$(DEPDIR)/libmltools_a-tools_utils-c.Po -rm -f ./$(DEPDIR)/libmltools_a-uri-c.Po -rm -f ./$(DEPDIR)/machine_readable_tests-dummy.Po diff --git a/common/mltools/libosinfo-c.c b/common/mltools/libosinfo-c.c new file mode 100644 index 0000000..93357fd --- /dev/null +++ b/common/mltools/libosinfo-c.c @@ -0,0 +1,346 @@ +/* virt-v2v + * Copyright (C) 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. + */ + +/** + * Mini interface to libosinfo. + */ + +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include + +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + +#define MAKE_VERSION_HEX(maj, min, mic) \ + (((maj) << 16) | ((min) << 8) | ((mic) << 0)) +#define V2V_LIBOSINFO_VERSION_HEX \ + MAKE_VERSION_HEX(OSINFO_MAJOR_VERSION, OSINFO_MINOR_VERSION, OSINFO_MICRO_VERSION) +#define IS_LIBOSINFO_VERSION(maj, min, mic) \ + (V2V_LIBOSINFO_VERSION_HEX >= MAKE_VERSION_HEX(maj, min, mic)) + +/* + * libosinfo 1.8.0 provides auto-cleanup functions for all its classes, + * so avoid declaring our own. + */ +#if !IS_LIBOSINFO_VERSION(1, 8, 0) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoFilter, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoLoader, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoOsList, g_object_unref) +G_DEFINE_AUTOPTR_CLEANUP_FUNC(OsinfoDeviceList, g_object_unref) +#endif + +typedef OsinfoDb *OsinfoDb_t; +typedef OsinfoOs *OsinfoOs_t; + +/* Wrap and unwrap handles, with a finalizer. */ +#define OsinfoDb_t_val(rv) (*(OsinfoDb_t *)Data_custom_val(rv)) + +#define _OsinfoOs_t_val(rv) (*((OsinfoOs_t *)Data_custom_val(rv))) +#define OsinfoOs_t_val(rv) _OsinfoOs_t_val(Field((rv),0)) + +static void +OsinfoDb_t_finalize (value tv) +{ + OsinfoDb_t t = OsinfoDb_t_val (tv); + if (t) g_object_unref (t); +} + +static struct custom_operations db_custom_operations = { + (char *) "OsinfoDb_t_custom_operations", + OsinfoDb_t_finalize, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default, + custom_compare_ext_default, +}; + +static value +Val_OsinfoDb_t (OsinfoDb_t t) +{ + CAMLparam0 (); + CAMLlocal1 (rv); + + rv = caml_alloc_custom (&db_custom_operations, + sizeof (OsinfoDb_t), 0, 1); + OsinfoDb_t_val(rv) = t; + + CAMLreturn (rv); +} + +static struct custom_operations os_custom_operations = { + (char *) "OsinfoOs_t_custom_operations", + custom_finalize_default, + custom_compare_default, + custom_hash_default, + custom_serialize_default, + custom_deserialize_default, + custom_compare_ext_default, +}; + +static value +Val_OsinfoOs_t (value dbv, OsinfoOs *os) +{ + CAMLparam1 (dbv); + CAMLlocal2 (rv, v); + + v = caml_alloc_custom (&os_custom_operations, + sizeof(OsinfoOs_t), 0, 1); + _OsinfoOs_t_val (v) = os; + rv = caml_alloc_tuple (2); + Store_field (rv, 0, v); + Store_field (rv, 1, dbv); + + CAMLreturn (rv); +} + +value +v2v_osinfo_db_load (value unitv) +{ + CAMLparam1 (unitv); + CAMLlocal2 (rv, errv); + g_autoptr(OsinfoLoader) loader = NULL; + OsinfoDb *db = NULL; + g_autoptr(GError) error = NULL; + + loader = osinfo_loader_new (); + osinfo_loader_process_default_path (loader, &error); + if (error != NULL) { + char *err; + + if (asprintf (&err, "libosinfo error: " + "osinfo_loader_process_default_path: %s", + error->message) >= 0) { + errv = caml_copy_string (err); + free (err); + } + else + errv = caml_copy_string ("osinfo_loader_process_default_path failed"); + + caml_failwith_value (errv); + } + + db = osinfo_loader_get_db (loader); + g_object_ref (db); + + rv = Val_OsinfoDb_t (db); + + CAMLreturn (rv); +} + +value +v2v_osinfo_os_find_os_by_short_id (value dbv, value osv) +{ + CAMLparam2 (dbv, osv); + CAMLlocal1 (rv); + g_autoptr(OsinfoFilter) filter = NULL; + g_autoptr(OsinfoOsList) os_list = NULL; + OsinfoList *list; + OsinfoOs *os; + + os_list = osinfo_db_get_os_list (OsinfoDb_t_val (dbv)); + filter = osinfo_filter_new (); + osinfo_filter_add_constraint (filter, OSINFO_PRODUCT_PROP_SHORT_ID, String_val (osv)); + list = osinfo_list_new_filtered (OSINFO_LIST(os_list), filter); + + if (osinfo_list_get_length (list) == 0) { + g_object_unref (list); + caml_raise_not_found (); + } + + os = OSINFO_OS(osinfo_list_get_nth (list, 0)); + rv = Val_OsinfoOs_t (dbv, os); + g_object_unref (list); + + CAMLreturn (rv); +} + +value +v2v_osinfo_os_get_id (value osv) +{ + CAMLparam1 (osv); + CAMLlocal1 (copyv); + const gchar *id; + + id = osinfo_entity_get_id (OSINFO_ENTITY(OsinfoOs_t_val (osv))); + copyv = caml_copy_string (id); + CAMLreturn (copyv); +} + +static value +glist_to_value_list (GList *list) +{ + CAMLparam0 (); + CAMLlocal3 (rv, v, copyv); + GList *l; + + rv = Val_emptylist; + for (l = list; l != NULL; l = l->next) { + v = caml_alloc (2, 0); + copyv = caml_copy_string (l->data); + Store_field (v, 0, copyv); + Store_field (v, 1, rv); + rv = v; + } + + CAMLreturn (rv); +} + +/* Collect OsinfoDevice properties from two levels: + * + * - The OSINFO_ENTITY_PROP_ID property, originating from the OsinfoEntity base + * class. This is a unique URI, identifying the device. + * + * - All currently known OSINFO_DEVICE_PROP_* properties, originating from the + * OsinfoDevice class. + * + * All of the above properties have string values. Thus, for uniformity, access + * all these properties by their names at the OsinfoEntity level (i.e., forego + * the class- and property-specific, dedicated property getter functions). + */ +static const char * const device_prop[] = { + OSINFO_ENTITY_PROP_ID, + OSINFO_DEVICE_PROP_VENDOR, + OSINFO_DEVICE_PROP_VENDOR_ID, + OSINFO_DEVICE_PROP_PRODUCT, + OSINFO_DEVICE_PROP_PRODUCT_ID, + OSINFO_DEVICE_PROP_NAME, + OSINFO_DEVICE_PROP_CLASS, + OSINFO_DEVICE_PROP_BUS_TYPE, + OSINFO_DEVICE_PROP_SUBSYSTEM, +}; +#define NUM_DEVICE_PROPS (sizeof device_prop / sizeof device_prop[0]) + +static value +v2v_osinfo_device_list_to_value_list (OsinfoDeviceList *dev_list) +{ + CAMLparam0 (); + CAMLlocal4 (retvalv, linkv, propsv, copyv); + OsinfoList *ent_list; + gint ent_nr; + + retvalv = Val_emptylist; + ent_list = OSINFO_LIST (dev_list); + ent_nr = osinfo_list_get_length (ent_list); + + while (ent_nr > 0) { + OsinfoEntity *ent; + size_t prop_nr; + + --ent_nr; + ent = osinfo_list_get_nth (ent_list, ent_nr); + + propsv = caml_alloc (NUM_DEVICE_PROPS, 0); + for (prop_nr = 0; prop_nr < NUM_DEVICE_PROPS; ++prop_nr) { + const gchar *prop_val; + + prop_val = osinfo_entity_get_param_value (ent, device_prop[prop_nr]); + if (prop_val == NULL) + prop_val = ""; + copyv = caml_copy_string (prop_val); + Store_field (propsv, prop_nr, copyv); + } + + linkv = caml_alloc (2, 0); + Store_field (linkv, 0, propsv); + Store_field (linkv, 1, retvalv); + retvalv = linkv; + } + + CAMLreturn (retvalv); +} + +value +v2v_osinfo_os_get_device_drivers (value osv) +{ + CAMLparam1 (osv); + CAMLlocal4 (rv, v, vi, copyv); + OsinfoDeviceDriverList *list; + gint i, len; + + list = osinfo_os_get_device_drivers (OsinfoOs_t_val (osv)); + len = osinfo_list_get_length (OSINFO_LIST(list)); + + rv = Val_emptylist; + for (i = len - 1; i >= 0; --i) { + OsinfoDeviceDriver *driver; + const gchar *str; + gboolean b; + GList *l; + gint64 i64; + OsinfoDeviceList *dev_list; + + driver = OSINFO_DEVICE_DRIVER(osinfo_list_get_nth (OSINFO_LIST(list), i)); + + vi = caml_alloc (6, 0); + str = osinfo_device_driver_get_architecture (driver); + copyv = caml_copy_string (str); + Store_field (vi, 0, copyv); + str = osinfo_device_driver_get_location (driver); + copyv = caml_copy_string (str); + Store_field (vi, 1, copyv); + b = osinfo_device_driver_get_pre_installable (driver); + Store_field (vi, 2, Val_bool (b)); + b = osinfo_device_driver_get_signed (driver); + Store_field (vi, 3, Val_bool (b)); +#if IS_LIBOSINFO_VERSION(1, 7, 0) + i64 = osinfo_device_driver_get_priority (driver); +#else + /* Same as OSINFO_DEVICE_DRIVER_DEFAULT_PRIORITY in libosinfo 1.7.0+. */ + i64 = 50; +#endif + copyv = caml_copy_int64 (i64); + Store_field (vi, 4, copyv); + l = osinfo_device_driver_get_files (driver); + Store_field (vi, 5, glist_to_value_list (l)); + g_list_free (l); + dev_list = osinfo_device_driver_get_devices (driver); + v = (dev_list == NULL) ? + Val_emptylist : + v2v_osinfo_device_list_to_value_list (dev_list); + Store_field (vi, 6, v); + + v = caml_alloc (2, 0); + Store_field (v, 0, vi); + Store_field (v, 1, rv); + rv = v; + } + + CAMLreturn (rv); +} + +value +v2v_osinfo_os_get_all_devices (value osv) +{ + CAMLparam1 (osv); + CAMLlocal1 (retvalv); + g_autoptr (OsinfoDeviceList) dev_list = NULL; + + dev_list = osinfo_os_get_all_devices (OsinfoOs_t_val (osv), NULL); + retvalv = v2v_osinfo_device_list_to_value_list (dev_list); + CAMLreturn (retvalv); +} diff --git a/common/mltools/libosinfo.ml b/common/mltools/libosinfo.ml new file mode 100644 index 0000000..8ea0a27 --- /dev/null +++ b/common/mltools/libosinfo.ml @@ -0,0 +1,68 @@ +(* virt-v2v + * Copyright (C) 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. + *) + +open Std_utils +open Tools_utils +open Common_gettext.Gettext + +type osinfo_db_t +type osinfo_os_t + +type osinfo_device = { + id : string; + vendor : string; + vendor_id : string; + product : string; + product_id : string; + name : string; + class_ : string; + bus_type : string; + subsystem : string; +} + +type osinfo_device_driver = { + architecture : string; + location : string; + pre_installable : bool; + signed : bool; + priority : int64; + files : string list; + devices : osinfo_device list; +} + +external osinfo_os_get_id : osinfo_os_t -> string = "v2v_osinfo_os_get_id" +external osinfo_os_get_device_drivers : osinfo_os_t -> osinfo_device_driver list = "v2v_osinfo_os_get_device_drivers" +external osinfo_os_get_devices : osinfo_os_t -> osinfo_device list = "v2v_osinfo_os_get_all_devices" + +class osinfo_os h = + object (self) + method get_id () = osinfo_os_get_id h + method get_device_drivers () = osinfo_os_get_device_drivers h + method get_devices () = osinfo_os_get_devices h +end + +external osinfo_db_load : unit -> osinfo_db_t = "v2v_osinfo_db_load" +external osinfo_db_find_os_by_short_id : osinfo_db_t -> string -> osinfo_os_t = "v2v_osinfo_os_find_os_by_short_id" + +class osinfo_db () = + let h = osinfo_db_load () in + object (self) + method find_os_by_short_id name = + let os = osinfo_db_find_os_by_short_id h name in + new osinfo_os os +end diff --git a/common/mltools/libosinfo.mli b/common/mltools/libosinfo.mli new file mode 100644 index 0000000..aa43637 --- /dev/null +++ b/common/mltools/libosinfo.mli @@ -0,0 +1,63 @@ +(* virt-v2v + * Copyright (C) 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. + *) + +(** This module implements a minimal libosinfo API. *) + +type osinfo_os_t + +type osinfo_device = { + id : string; + vendor : string; + vendor_id : string; + product : string; + product_id : string; + name : string; + class_ : string; + bus_type : string; + subsystem : string; +} + +type osinfo_device_driver = { + architecture : string; + location : string; + pre_installable : bool; + signed : bool; + priority : int64; + files : string list; + devices : osinfo_device list; +} + +class osinfo_os : osinfo_os_t -> object + method get_id : unit -> string + (** Return the ID. *) + method get_device_drivers : unit -> osinfo_device_driver list + (** Return the list of device drivers. *) + method get_devices : unit -> osinfo_device list + (** Return the list of devices. *) +end +(** Minimal OsinfoOs wrapper. *) + +class osinfo_db : unit -> object + method find_os_by_short_id : string -> osinfo_os + (** [find_os_by_short_id short-id] get the [osinfo_os] that has the + specified [short-id]. + + Raise [Not_found] in case there is no matching OS. + *) +end +(** Minimal OsinfoDb wrapper. *) diff --git a/common/mltools/libosinfo_utils.ml b/common/mltools/libosinfo_utils.ml new file mode 100644 index 0000000..8504e2b --- /dev/null +++ b/common/mltools/libosinfo_utils.ml @@ -0,0 +1,133 @@ +(* virt-v2v + * Copyright (C) 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. + *) + +open Std_utils +open Tools_utils +open Common_gettext.Gettext + +(* Singleton DB, created on the first access. *) +let db = lazy (new Libosinfo.osinfo_db ()) +(* + * Helper function to get the DB -- use it as sole way to get the DB. + *) +let get_db () = + Lazy.force db + +let get_os_by_short_id os = + let os = (get_db ())#find_os_by_short_id os in + debug "libosinfo: loaded OS: %s" (os#get_id ()); + os + +let string_of_osinfo_device_list dev_list = + + (* Turn the fields of an "osinfo_device" record into a list. *) + let listify { Libosinfo.id; vendor; vendor_id; product; product_id; name; + class_; bus_type; subsystem } = + [ id; vendor; vendor_id; product; product_id; name; + class_; bus_type; subsystem ] + + (* Given a list of strings, and a list of previously known maximum widths, + * "increase" each width, if necessary, to the length of the corresponding + * string. + *) + and grow_widths = List.map2 (fun s -> max (String.length s)) + in + + (* Compute the maximum width for each field in "dev_list". *) + let max_widths = + List.fold_right grow_widths (List.map listify dev_list) + [ 0; 0; 0; 0; 0; 0; 0; 0; 0 ] + + (* Given a list of strings and a list of field widths, format "string1 | + * string2 | ... | stringN" such that each field is right-padded to the + * corresponding width. + *) + and columnate strings widths = + String.concat " | " (List.map2 (Printf.sprintf "%-*s") widths strings) + in + + (* Format "dev_list" as a table by (a) printing one "osinfo_device" record + * per line, and (b) right-padding each field of each "osinfo_device" record + * to the maximum width of that field. + *) + String.concat "\n" + (List.map (fun dev -> columnate (listify dev) max_widths) dev_list) + +let string_of_osinfo_device_driver { Libosinfo.architecture; location; + pre_installable; signed; priority; + files; devices } = + Printf.sprintf "%s: [%s, %s, %s, priority %Ld]\nFiles:\n%s\nDevices:\n%s" + location architecture + (if pre_installable then "pre-installable" else "not pre-installable") + (if signed then "signed" else "unsigned") + priority + (String.concat "\n" files) + (string_of_osinfo_device_list devices) + +let best_driver drivers arch = + let debug_drivers = + List.iter (fun d -> debug "Driver: %s" (string_of_osinfo_device_driver d)) + (* The architecture that "inspect.i_arch" from libguestfs + * ("daemon/filearch.ml") calls "i386", the osinfo-db schema + * ("data/schema/osinfo.rng.in") calls "i686". + *) + and arch = if arch = "i386" then "i686" else arch in + debug "libosinfo drivers before filtering:"; + debug_drivers drivers; + let drivers = + List.filter ( + fun { Libosinfo.architecture; location; pre_installable } -> + if architecture <> arch || not pre_installable then + false + else + try + (match Xml.parse_uri location with + | { Xml.uri_scheme = Some scheme; + Xml.uri_path = Some _ } when scheme = "file" -> true + | _ -> false + ) + with Invalid_argument _ -> false + ) drivers in + debug "libosinfo drivers after filtering:"; + debug_drivers drivers; + let drivers = + List.sort ( + fun { Libosinfo.priority = prioA } { Libosinfo.priority = prioB } -> + compare prioB prioA + ) drivers in + if drivers = [] then + raise Not_found; + List.hd drivers + +type os_support = { + q35 : bool; + vio10 : bool; +} + +let os_support_of_osinfo_device_list = + let rec next accu left = + match accu, left with + | { q35 = true; vio10 = true }, _ + | _ , [] -> + accu + | { q35; vio10 }, { Libosinfo.id } :: tail -> + let q35 = q35 || id = "http://qemu.org/chipset/x86/q35" + and vio10 = vio10 || id = "http://pcisig.com/pci/1af4/1041" in + next { q35; vio10 } tail + in + next { q35 = false; vio10 = false } diff --git a/common/mltools/libosinfo_utils.mli b/common/mltools/libosinfo_utils.mli new file mode 100644 index 0000000..14991bc --- /dev/null +++ b/common/mltools/libosinfo_utils.mli @@ -0,0 +1,58 @@ +(* virt-v2v + * Copyright (C) 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. + *) + +(** This module implements helper functions based on libosinfo. *) + +val get_os_by_short_id : string -> Libosinfo.osinfo_os +(** [get_os_by_short_id short-id] get the [Libosinfo.osinfo_os] + that has the specified [short-id]. + + Raise [Not_found] in case there is no matching OS. + *) + +val string_of_osinfo_device_list : Libosinfo.osinfo_device list -> string +(** Convert an [osinfo_device] list to a printable string for debugging. *) + +val string_of_osinfo_device_driver : Libosinfo.osinfo_device_driver -> string +(** Convert a [osinfo_device_driver] to a printable string for debugging. *) + +val best_driver : Libosinfo.osinfo_device_driver list -> + string -> + Libosinfo.osinfo_device_driver +(** [best_driver drivers arch] picks the best driver from [drivers] as follows: + - filters out drivers that: + - target a different architecture, + - are not pre-installable, + - have an invalid or non-local URL; + - sorts the remaining drivers by priority, like libosinfo does; + - picks the top driver of the sorted list. + Raises Not_found if no driver in [drivers] survives filtering. *) + +type os_support = { + q35 : bool; + vio10 : bool; +} +(** Tell whether the operating system supports the Q35 board type and/or + non-transitional (virtio-1.0-only) virtio devices. (Internally, the + virtio-1.0-net device is used as a proxy for the general statement about + virtio-1.0.) + *) + +val os_support_of_osinfo_device_list : Libosinfo.osinfo_device list -> + os_support +(** Get [os_support] from an [osinfo_device] list. *) diff --git a/common/mltools/on_exit.ml b/common/mltools/on_exit.ml index 53ccb68..f8ef74e 100644 --- a/common/mltools/on_exit.ml +++ b/common/mltools/on_exit.ml @@ -23,39 +23,39 @@ open Common_gettext.Gettext open Unix open Printf -(* List of files to unlink. *) -let files = ref [] +type action = + | Unlink of string (* filename *) + | Rm_rf of string (* directory *) + | Kill of int * int (* signal, pid *) + | Fn of (unit -> unit) (* generic function *) -(* List of directories to remove. *) -let rmdirs = ref [] - -(* List of PIDs to kill. *) -let kills = ref [] - -(* List of functions to call. *) -let fns = ref [] +(* List of (priority, action). *) +let actions = 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) +let do_action action = + try + match action with + | Unlink file -> Unix.unlink file + | Rm_rf dir -> + let cmd = sprintf "rm -rf -- %s" (Filename.quote dir) in + ignore (Tools_utils.shell_command cmd) + | Kill (signal, pid) -> + kill pid signal + | Fn f -> f () + 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. *) +(* Perform the exit actions in priority order (lowest prio first). *) 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; + let actions = List.sort (fun (a, _) (b, _) -> compare a b) !actions in + let actions = List.map snd actions in + List.iter do_action actions ); done_actions := true @@ -94,18 +94,18 @@ let register () = ); registered := true -let f fn = +let f ?(prio = 5000) fn = register (); - List.push_front fn fns + List.push_front (prio, Fn fn) actions -let unlink filename = +let unlink ?(prio = 5000) filename = register (); - List.push_front filename files + List.push_front (prio, Unlink filename) actions -let rmdir dir = +let rm_rf ?(prio = 5000) dir = register (); - List.push_front dir rmdirs + List.push_front (prio, Rm_rf dir) actions -let kill ?(signal = Sys.sigterm) pid = +let kill ?(prio = 5000) ?(signal = Sys.sigterm) pid = register (); - List.push_front (signal, pid) kills + List.push_front (prio, Kill (signal, pid)) actions diff --git a/common/mltools/on_exit.mli b/common/mltools/on_exit.mli index a02e3db..e19f169 100644 --- a/common/mltools/on_exit.mli +++ b/common/mltools/on_exit.mli @@ -1,5 +1,5 @@ (* Common way to handle actions on exit. - * Copyright (C) 2010-2021 Red Hat Inc. + * Copyright (C) 2010-2023 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 @@ -28,6 +28,12 @@ killing another process, so we provide simple wrappers for those common actions here. + Actions can be ordered by setting the optional [?prio] + parameter in the range 0..9999. By default actions + have priority 5000. Lower numbered actions run first. + Higher numbered actions run last. So to have an action + run at the very end before exit you might use [~prio:9999] + Note this module registers signal handlers for SIGINT, SIGQUIT, SIGTERM and SIGHUP. This means that any program that links with mltools.cmxa @@ -39,18 +45,20 @@ Your cleanup action might no longer run unless the program calls {!Stdlib.exit}. *) -val f : (unit -> unit) -> unit +val f : ?prio:int -> (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. *) + killed with a signal that we can catch. + + [?prio] is the priority, default 5000. See the description above. *) -val unlink : string -> unit +val unlink : ?prio:int -> string -> unit (** Unlink a single temporary file on exit. *) -val rmdir : string -> unit +val rm_rf : ?prio:int -> string -> unit (** Recursively remove a temporary directory on exit (using [rm -rf]). *) -val kill : ?signal:int -> int -> unit +val kill : ?prio:int -> ?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 diff --git a/common/mltools/tools_utils-c.c b/common/mltools/tools_utils-c.c index 0814667..4ff42e5 100644 --- a/common/mltools/tools_utils-c.c +++ b/common/mltools/tools_utils-c.c @@ -62,24 +62,31 @@ guestfs_int_mllib_inspect_decrypt (value gv, value gpv, value keysv) caml_raise_out_of_memory (); v = Field (elemv, 1); - switch (Tag_val (v)) { - case 0: /* KeyString of string */ - key.type = key_string; - key.string.s = strdup (String_val (Field (v, 0))); - if (!key.string.s) - caml_raise_out_of_memory (); - break; - case 1: /* KeyFileName of string */ - key.type = key_file; - key.file.name = strdup (String_val (Field (v, 0))); - if (!key.file.name) - caml_raise_out_of_memory (); - break; - default: - error (EXIT_FAILURE, 0, - "internal error: unhandled Tag_val (v) = %d", - Tag_val (v)); - } + if (Is_block (v)) + switch (Tag_val (v)) { + case 0: /* KeyString of string */ + key.type = key_string; + key.string.s = strdup (String_val (Field (v, 0))); + if (!key.string.s) + caml_raise_out_of_memory (); + break; + case 1: /* KeyFileName of string */ + key.type = key_file; + key.file.name = strdup (String_val (Field (v, 0))); + if (!key.file.name) + caml_raise_out_of_memory (); + break; + default: + abort (); + } + else + switch (Int_val (v)) { + case 0: /* KeyClevis */ + key.type = key_clevis; + break; + default: + abort (); + } ks = key_store_import_key (ks, &key); diff --git a/common/mltools/tools_utils.ml b/common/mltools/tools_utils.ml index 695fda7..562bfad 100644 --- a/common/mltools/tools_utils.ml +++ b/common/mltools/tools_utils.ml @@ -29,11 +29,12 @@ open Getopt.OptionName let prog = ref prog type key_store = { - keys : (string, key_store_key) Hashtbl.t; + keys : (string * key_store_key) list ref; } and key_store_key = | KeyString of string | KeyFileName of string + | KeyClevis 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] @@ -376,7 +377,7 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) ) in let ks = { - keys = Hashtbl.create 13; + keys = ref []; } in let argspec = ref argspec in let add_argspec = List.push_back argspec in @@ -392,14 +393,28 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) if key_opts then ( let parse_key_selector arg = - let parts = String.nsplit ~max:3 ":" arg in + let parts = String.nsplit ":" arg in match parts with + | [] -> + error (f_"selector '%s': missing ID") arg + | [ _ ] -> + error (f_"selector '%s': missing TYPE") arg + | [ _; "key" ] + | _ :: "key" :: _ :: _ :: _ -> + error (f_"selector '%s': missing KEY_STRING, or too many fields") arg | [ device; "key"; key ] -> - Hashtbl.replace ks.keys device (KeyString key) + List.push_back ks.keys (device, KeyString key) + | [ _; "file" ] + | _ :: "file" :: _ :: _ :: _ -> + error (f_"selector '%s': missing FILENAME, or too many fields") arg | [ device; "file"; file ] -> - Hashtbl.replace ks.keys device (KeyFileName file) + List.push_back ks.keys (device, KeyFileName file) + | _ :: "clevis" :: _ :: _ -> + error (f_"selector '%s': too many fields") arg + | [ device; "clevis" ] -> + List.push_back ks.keys (device, KeyClevis) | _ -> - error (f_"invalid selector string for --key: %s") arg + error (f_"selector '%s': invalid TYPE") arg in add_argspec ([ L"echo-keys" ], Getopt.Unit c_set_echo_keys, s_"Don’t turn off echo for passphrases"); @@ -420,16 +435,6 @@ let create_standard_options argspec ?anon_fun ?(key_opts = false) let getopt = Getopt.create argspec ?anon_fun usage_msg in { 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 = if echo_cmd then @@ -691,21 +696,19 @@ let is_btrfs_subvolume g fs = if g#last_errno () = Guestfs.Errno.errno_EINVAL then false else raise exn +let key_store_requires_network ks = + List.exists (function + | _, KeyClevis -> true + | _ -> false) !(ks.keys) + let inspect_decrypt g ks = - (* Turn the keys in the key_store into a simpler struct, so it is possible - * to read it using the C API. - *) - let keys_as_list = Hashtbl.fold ( - fun k v acc -> - (k, v) :: acc - ) ks.keys [] in (* Note we pass original 'g' even though it is not used by the * callee. This is so that 'g' is kept as a root on the stack, and * so cannot be garbage collected while we are in the c_inspect_decrypt * function. *) c_inspect_decrypt g#ocaml_handle (Guestfs.c_pointer g#ocaml_handle) - keys_as_list + !(ks.keys) let with_timeout op timeout ?(sleep = 2) fn = let start_t = Unix.gettimeofday () in diff --git a/common/mltools/tools_utils.mli b/common/mltools/tools_utils.mli index 5018300..ec900e6 100644 --- a/common/mltools/tools_utils.mli +++ b/common/mltools/tools_utils.mli @@ -103,14 +103,6 @@ val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?k 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. @@ -204,6 +196,10 @@ val inspect_mount_root_ro : Guestfs.guestfs -> string -> unit val is_btrfs_subvolume : Guestfs.guestfs -> string -> bool (** Checks if a filesystem is a btrfs subvolume. *) +val key_store_requires_network : key_store -> bool +(** [key_store_requires_network ks] returns [true] iff [ks] contains at least + one "ID:clevis" selector. *) + val inspect_decrypt : Guestfs.guestfs -> key_store -> unit (** Simple implementation of decryption: look for any encrypted partitions and decrypt them, then rescan for VGs. *) diff --git a/common/mlutils/Makefile.in b/common/mlutils/Makefile.in index d722265..824a1cd 100644 --- a/common/mlutils/Makefile.in +++ b/common/mlutils/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -492,7 +492,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -521,6 +520,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -591,6 +592,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/mlvisit/Makefile.in b/common/mlvisit/Makefile.in index fc8ab2f..f9672ca 100644 --- a/common/mlvisit/Makefile.in +++ b/common/mlvisit/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -490,7 +490,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -519,6 +518,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -589,6 +590,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/mlxml/Makefile.in b/common/mlxml/Makefile.in index 9f172fc..6b3a204 100644 --- a/common/mlxml/Makefile.in +++ b/common/mlxml/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -277,7 +277,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -306,6 +305,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -376,6 +377,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/options/Makefile.in b/common/options/Makefile.in index 1d53c4c..de5431b 100644 --- a/common/options/Makefile.in +++ b/common/options/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -283,7 +283,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -312,6 +311,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -382,6 +383,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/options/decrypt.c b/common/options/decrypt.c index 1cd7b62..0661d0f 100644 --- a/common/options/decrypt.c +++ b/common/options/decrypt.c @@ -38,6 +38,10 @@ #include "options.h" +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + static void append_char (size_t *idx, char *buffer, char c) { @@ -124,10 +128,10 @@ decrypt_mountables (guestfs_h *g, const char * const *mountables, while ((mountable = *mnt_scan++) != NULL) { CLEANUP_FREE char *type = NULL; CLEANUP_FREE char *uuid = NULL; - CLEANUP_FREE_STRING_LIST char **keys = NULL; + struct matching_key *keys; + size_t nr_matches; CLEANUP_FREE char *mapname = NULL; - const char * const *key_scan; - const char *key; + size_t scan; type = guestfs_vfs_type (g, mountable); if (type == NULL) @@ -144,33 +148,45 @@ decrypt_mountables (guestfs_h *g, const char * const *mountables, /* 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); + keys = get_keys (ks, mountable, uuid, &nr_matches); + assert (nr_matches > 0); /* Generate a node name for the plaintext (decrypted) device node. */ if (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) { + for (scan = 0; scan < nr_matches; ++scan) { + struct matching_key *key = keys + scan; int r; guestfs_push_error_handler (g, NULL, NULL); - r = guestfs_cryptsetup_open (g, mountable, key, mapname, -1); + assert (key->clevis == (key->passphrase == NULL)); + if (key->clevis) +#ifdef GUESTFS_HAVE_CLEVIS_LUKS_UNLOCK + r = guestfs_clevis_luks_unlock (g, mountable, mapname); +#else + error (EXIT_FAILURE, 0, + _("'clevis_luks_unlock', needed for decrypting %s, is " + "unavailable in this libguestfs version"), mountable); +#endif + else + r = guestfs_cryptsetup_open (g, mountable, key->passphrase, mapname, + -1); guestfs_pop_error_handler (g); if (r == 0) break; } - if (key == NULL) + if (scan == nr_matches) 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)); + free_keys (keys, nr_matches); decrypted_some = true; } @@ -184,8 +200,8 @@ decrypt_mountables (guestfs_h *g, const char * const *mountables, void inspect_do_decrypt (guestfs_h *g, struct key_store *ks) { + const char *lvm2_feature[] = { "lvm2", NULL }; CLEANUP_FREE_STRING_LIST char **partitions = guestfs_list_partitions (g); - CLEANUP_FREE_STRING_LIST char **lvs = NULL; bool need_rescan; if (partitions == NULL) @@ -193,13 +209,17 @@ inspect_do_decrypt (guestfs_h *g, struct key_store *ks) need_rescan = decrypt_mountables (g, (const char * const *)partitions, ks); - if (need_rescan) { - if (guestfs_lvm_scan (g, 1) == -1) + if (guestfs_feature_available (g, (char **) lvm2_feature) > 0) { + CLEANUP_FREE_STRING_LIST char **lvs = NULL; + + 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); } - - lvs = guestfs_lvs (g); - if (lvs == NULL) - exit (EXIT_FAILURE); - decrypt_mountables (g, (const char * const *)lvs, ks); } diff --git a/common/options/key-option.pod b/common/options/key-option.pod index 90a3b15..6bc04df 100644 --- a/common/options/key-option.pod +++ b/common/options/key-option.pod @@ -14,4 +14,13 @@ Use the specified C as passphrase. Read the passphrase from F. +=item B<--key> C:clevis + +Attempt passphrase-less unlocking for C with Clevis, over the +network. Please refer to L for more +information on network-bound disk encryption (NBDE). + +Note that if any such option is present on the command line, QEMU user +networking will be automatically enabled for the libguestfs appliance. + =back diff --git a/common/options/keys.c b/common/options/keys.c index 798315c..48f1bc7 100644 --- a/common/options/keys.c +++ b/common/options/keys.c @@ -1,5 +1,5 @@ /* libguestfs - guestfish and guestmount shared option parsing - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 @@ -125,30 +125,35 @@ read_first_line_from_file (const char *filename) * keystore. There may be multiple. If none are read from the * keystore, ask the user. */ -char ** -get_keys (struct key_store *ks, const char *device, const char *uuid) +struct matching_key * +get_keys (struct key_store *ks, const char *device, const char *uuid, + size_t *nr_matches) { - size_t i, j, len; - char **r; + size_t i, nmemb; + struct matching_key *r, *match; char *s; /* We know the returned list must have at least one element and not * more than ks->nr_keys. */ - len = 1; - if (ks) - len = MIN (1, ks->nr_keys); - r = calloc (len+1, sizeof (char *)); + nmemb = 1; + if (ks && ks->nr_keys > nmemb) + nmemb = ks->nr_keys; + + if (nmemb > (size_t)-1 / sizeof *r) + error (EXIT_FAILURE, 0, _("size_t overflow")); + + r = malloc (nmemb * sizeof *r); if (r == NULL) - error (EXIT_FAILURE, errno, "calloc"); + error (EXIT_FAILURE, errno, "malloc"); - j = 0; + match = r; if (ks) { for (i = 0; i < ks->nr_keys; ++i) { struct key_store_key *key = &ks->keys[i]; - if (STRNEQ (key->id, device) && (uuid && STRNEQ (key->id, uuid))) + if (STRNEQ (key->id, device) && (!uuid || STRNEQ (key->id, uuid))) continue; switch (key->type) { @@ -156,68 +161,101 @@ get_keys (struct key_store *ks, const char *device, const char *uuid) s = strdup (key->string.s); if (!s) error (EXIT_FAILURE, errno, "strdup"); - r[j++] = s; + match->clevis = false; + match->passphrase = s; + ++match; break; case key_file: s = read_first_line_from_file (key->file.name); - r[j++] = s; + match->clevis = false; + match->passphrase = s; + ++match; + break; + case key_clevis: + match->clevis = true; + match->passphrase = NULL; + ++match; break; } } } - if (j == 0) { + if (match == r) { /* Key not found in the key store, ask the user for it. */ s = read_key (device); if (!s) error (EXIT_FAILURE, 0, _("could not read key from user")); - r[0] = s; + match->clevis = false; + match->passphrase = s; + ++match; } + *nr_matches = (size_t)(match - r); return r; } +void +free_keys (struct matching_key *keys, size_t nr_matches) +{ + size_t i; + + for (i = 0; i < nr_matches; ++i) { + struct matching_key *key = keys + i; + + assert (key->clevis == (key->passphrase == NULL)); + if (!key->clevis) + free (key->passphrase); + } + free (keys); +} + struct key_store * key_store_add_from_selector (struct key_store *ks, const char *selector) { - CLEANUP_FREE_STRING_LIST char **fields = - guestfs_int_split_string (':', selector); + CLEANUP_FREE_STRING_LIST char **fields = NULL; + size_t field_count; struct key_store_key key; + fields = guestfs_int_split_string (':', selector); if (!fields) error (EXIT_FAILURE, errno, "guestfs_int_split_string"); + field_count = guestfs_int_count_strings (fields); - if (guestfs_int_count_strings (fields) != 3) { - invalid_selector: - error (EXIT_FAILURE, 0, "invalid selector for --key: %s", selector); - } - - /* 1: device */ + /* field#0: ID */ + if (field_count < 1) + error (EXIT_FAILURE, 0, _("selector '%s': missing ID"), selector); key.id = strdup (fields[0]); if (!key.id) error (EXIT_FAILURE, errno, "strdup"); - /* 2: key type */ - if (STREQ (fields[1], "key")) - key.type = key_string; - else if (STREQ (fields[1], "file")) - key.type = key_file; - else - goto invalid_selector; + /* field#1...: TYPE, and TYPE-specific properties */ + if (field_count < 2) + error (EXIT_FAILURE, 0, _("selector '%s': missing TYPE"), selector); - /* 3: actual key */ - switch (key.type) { - case key_string: + if (STREQ (fields[1], "key")) { + key.type = key_string; + if (field_count != 3) + error (EXIT_FAILURE, 0, + _("selector '%s': missing KEY_STRING, or too many fields"), + selector); key.string.s = strdup (fields[2]); if (!key.string.s) error (EXIT_FAILURE, errno, "strdup"); - break; - case key_file: + } else if (STREQ (fields[1], "file")) { + key.type = key_file; + if (field_count != 3) + error (EXIT_FAILURE, 0, + _("selector '%s': missing FILENAME, or too many fields"), + selector); key.file.name = strdup (fields[2]); if (!key.file.name) error (EXIT_FAILURE, errno, "strdup"); - break; - } + } else if (STREQ (fields[1], "clevis")) { + key.type = key_clevis; + if (field_count != 2) + error (EXIT_FAILURE, 0, _("selector '%s': too many fields"), selector); + } else + error (EXIT_FAILURE, 0, _("selector '%s': invalid TYPE"), selector); return key_store_import_key (ks, &key); } @@ -246,6 +284,21 @@ key_store_import_key (struct key_store *ks, const struct key_store_key *key) return ks; } +bool +key_store_requires_network (const struct key_store *ks) +{ + size_t i; + + if (ks == NULL) + return false; + + for (i = 0; i < ks->nr_keys; ++i) + if (ks->keys[i].type == key_clevis) + return true; + + return false; +} + void free_key_store (struct key_store *ks) { @@ -264,7 +317,13 @@ free_key_store (struct key_store *ks) case key_file: free (key->file.name); break; + case key_clevis: + /* nothing */ + break; } free (key->id); } + + free (ks->keys); + free (ks); } diff --git a/common/options/options.c b/common/options/options.c index abdcbae..4e1081c 100644 --- a/common/options/options.c +++ b/common/options/options.c @@ -1,5 +1,5 @@ /* libguestfs - guestfish and guestmount shared option parsing - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 diff --git a/common/options/options.h b/common/options/options.h index 80df91a..94573ee 100644 --- a/common/options/options.h +++ b/common/options/options.h @@ -1,5 +1,5 @@ /* libguestfs - guestfish and guestmount shared option parsing - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 @@ -115,6 +115,7 @@ struct key_store_key { enum { key_string, /* key specified as string */ key_file, /* key stored in a file */ + key_clevis, /* key reconstructed with Clevis+Tang */ } type; union { struct { @@ -134,6 +135,19 @@ struct key_store { size_t nr_keys; }; +/* A key matching a particular ID (pathname of the libguestfs device node that + * stands for the encrypted block device, or LUKS UUID). + */ +struct matching_key { + /* True iff the passphrase should be reconstructed using Clevis, talking to + * Tang servers over the network. + */ + bool clevis; + + /* Explicit passphrase, otherwise. */ + char *passphrase; +}; + /* in config.c */ extern void parse_config (void); @@ -151,9 +165,12 @@ extern void print_inspect_prompt (void); /* in key.c */ extern char *read_key (const char *param); -extern char **get_keys (struct key_store *ks, const char *device, const char *uuid); +extern struct matching_key *get_keys (struct key_store *ks, const char *device, + const char *uuid, size_t *nr_matches); +extern void free_keys (struct matching_key *keys, size_t nr_matches); extern struct key_store *key_store_add_from_selector (struct key_store *ks, const char *selector); extern struct key_store *key_store_import_key (struct key_store *ks, const struct key_store_key *key); +extern bool key_store_requires_network (const struct key_store *ks); extern void free_key_store (struct key_store *ks); /* in options.c */ diff --git a/common/options/uri.c b/common/options/uri.c index 6b696fc..84d393c 100644 --- a/common/options/uri.c +++ b/common/options/uri.c @@ -135,7 +135,7 @@ parse (const char *arg, char **path_ret, char **protocol_ret, socket = query_get (uri, "socket"); if (uri->server && STRNEQ (uri->server, "") && socket) { - fprintf (stderr, _("%s: %s: cannot both a server name and a socket query parameter\n"), + fprintf (stderr, _("%s: %s: cannot have both a server name and a socket query parameter\n"), getprogname (), arg); return -1; } @@ -347,6 +347,7 @@ make_server (xmlURIPtr uri, const char *socket, char ***ret) *ret = malloc (sizeof (char *) * 2); if (*ret == NULL) { perror ("malloc"); + free (server); return -1; } (*ret)[0] = server; diff --git a/common/parallel/Makefile.in b/common/parallel/Makefile.in index 045cc25..f1f5ce4 100644 --- a/common/parallel/Makefile.in +++ b/common/parallel/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -280,7 +280,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -309,6 +308,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -379,6 +380,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/parallel/parallel.c b/common/parallel/parallel.c index c89bea8..18b0607 100644 --- a/common/parallel/parallel.c +++ b/common/parallel/parallel.c @@ -172,7 +172,7 @@ worker_thread (void *thread_data_vp) thread_data->r = 0; if (thread_data->verbose) - fprintf (stderr, "parallel: thread %zu starting\n", + fprintf (stderr, "parallel: thread %zu: starting\n", thread_data->thread_num); while (1) { @@ -186,7 +186,7 @@ worker_thread (void *thread_data_vp) /* Take the next domain from the list. */ if (thread_data->verbose) - fprintf (stderr, "parallel: thread %zu waiting to get work\n", + fprintf (stderr, "parallel: thread %zu: waiting to get work\n", thread_data->thread_num); err = pthread_mutex_lock (&take_mutex); @@ -207,7 +207,7 @@ worker_thread (void *thread_data_vp) break; if (thread_data->verbose) - fprintf (stderr, "parallel: thread %zu taking domain %zu\n", + fprintf (stderr, "parallel: thread %zu: taking domain %zu\n", thread_data->thread_num, i); fp = open_memstream (&output, &output_len); @@ -240,7 +240,7 @@ worker_thread (void *thread_data_vp) if (thread_data->verbose) fprintf (stderr, - "parallel: thread %zu work function returned an error\n", + "parallel: thread %zu: work function returned an error\n", thread_data->thread_num); } @@ -250,16 +250,20 @@ worker_thread (void *thread_data_vp) /* Retire this domain. We have to retire domains in order, which * may mean waiting for another thread to finish here. */ - if (thread_data->verbose) - fprintf (stderr, "parallel: thread %zu waiting to retire domain %zu\n", - thread_data->thread_num, i); - err = pthread_mutex_lock (&retire_mutex); if (err != 0) { thread_failure ("pthread_mutex_lock", err); thread_data->r = -1; return &thread_data->r; } + + if (thread_data->verbose) + fprintf (stderr, "parallel: thread %zu: " + "waiting to retire domain %zu " + "(next domain to retire %zu)" + "\n", + thread_data->thread_num, i, next_domain_to_retire); + while (next_domain_to_retire != i) { err = pthread_cond_wait (&retire_cond, &retire_mutex); if (err != 0) { @@ -271,13 +275,18 @@ worker_thread (void *thread_data_vp) } if (thread_data->verbose) - fprintf (stderr, "parallel: thread %zu retiring domain %zu\n", + fprintf (stderr, "parallel: thread %zu: retiring domain %zu\n", thread_data->thread_num, i); /* Retire domain. */ printf ("%s", output); /* Update next_domain_to_retire and tell other threads. */ + if (thread_data->verbose) + fprintf (stderr, "parallel: thread %zu: " + "next domain to retire %zu -> %zu\n", + thread_data->thread_num, next_domain_to_retire, i+1); + next_domain_to_retire = i+1; pthread_cond_broadcast (&retire_cond); err = pthread_mutex_unlock (&retire_mutex); @@ -289,7 +298,7 @@ worker_thread (void *thread_data_vp) } if (thread_data->verbose) - fprintf (stderr, "parallel: thread %zu exiting (r = %d)\n", + fprintf (stderr, "parallel: thread %zu: exiting (r = %d)\n", thread_data->thread_num, thread_data->r); return &thread_data->r; diff --git a/common/progress/Makefile.in b/common/progress/Makefile.in index eccae56..2324f15 100644 --- a/common/progress/Makefile.in +++ b/common/progress/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -273,7 +273,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -302,6 +301,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -372,6 +373,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/progress/progress.c b/common/progress/progress.c index 29e900d..4d52b97 100644 --- a/common/progress/progress.c +++ b/common/progress/progress.c @@ -1,5 +1,5 @@ /* libguestfs - mini library for progress bars. - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 diff --git a/common/progress/progress.h b/common/progress/progress.h index 4fc0eaf..21425c0 100644 --- a/common/progress/progress.h +++ b/common/progress/progress.h @@ -1,5 +1,5 @@ /* libguestfs - mini library for progress bars. - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 diff --git a/common/structs/Makefile.in b/common/structs/Makefile.in index dda0f40..a761562 100644 --- a/common/structs/Makefile.in +++ b/common/structs/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -274,7 +274,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -303,6 +302,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -373,6 +374,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/structs/structs-cleanups.c b/common/structs/structs-cleanups.c index 52f4927..3ff59cc 100644 --- a/common/structs/structs-cleanups.c +++ b/common/structs/structs-cleanups.c @@ -4,7 +4,7 @@ * and from the code in the generator/ subdirectory. * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. * - * Copyright (C) 2009-2020 Red Hat Inc. + * Copyright (C) 2009-2023 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/common/structs/structs-cleanups.h b/common/structs/structs-cleanups.h index 727c301..b43dbd7 100644 --- a/common/structs/structs-cleanups.h +++ b/common/structs/structs-cleanups.h @@ -4,7 +4,7 @@ * and from the code in the generator/ subdirectory. * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. * - * Copyright (C) 2009-2020 Red Hat Inc. + * Copyright (C) 2009-2023 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/common/structs/structs-print.c b/common/structs/structs-print.c index ea6ea56..6d825e1 100644 --- a/common/structs/structs-print.c +++ b/common/structs/structs-print.c @@ -4,7 +4,7 @@ * and from the code in the generator/ subdirectory. * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. * - * Copyright (C) 2009-2020 Red Hat Inc. + * Copyright (C) 2009-2023 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/common/structs/structs-print.h b/common/structs/structs-print.h index 6bcd8bb..c2d5cfb 100644 --- a/common/structs/structs-print.h +++ b/common/structs/structs-print.h @@ -4,7 +4,7 @@ * and from the code in the generator/ subdirectory. * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. * - * Copyright (C) 2009-2020 Red Hat Inc. + * Copyright (C) 2009-2023 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/common/utils/Makefile.am b/common/utils/Makefile.am index 665fc43..25c6100 100644 --- a/common/utils/Makefile.am +++ b/common/utils/Makefile.am @@ -22,6 +22,7 @@ noinst_LTLIBRARIES = libutils.la libutils_la_SOURCES = \ cleanups.c \ cleanups.h \ + environ.c \ gnulib-cleanups.c \ guestfs-stringlists-utils.h \ guestfs-utils.h \ diff --git a/common/utils/Makefile.in b/common/utils/Makefile.in index ff5df3d..24a5965 100644 --- a/common/utils/Makefile.in +++ b/common/utils/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -168,9 +168,9 @@ CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libutils_la_LIBADD = am_libutils_la_OBJECTS = libutils_la-cleanups.lo \ - libutils_la-gnulib-cleanups.lo libutils_la-libxml2-cleanups.lo \ - libutils_la-pcre2-cleanups.lo libutils_la-stringlists-utils.lo \ - libutils_la-utils.lo + libutils_la-environ.lo libutils_la-gnulib-cleanups.lo \ + libutils_la-libxml2-cleanups.lo libutils_la-pcre2-cleanups.lo \ + libutils_la-stringlists-utils.lo libutils_la-utils.lo libutils_la_OBJECTS = $(am_libutils_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -195,6 +195,7 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libutils_la-cleanups.Plo \ + ./$(DEPDIR)/libutils_la-environ.Plo \ ./$(DEPDIR)/libutils_la-gnulib-cleanups.Plo \ ./$(DEPDIR)/libutils_la-libxml2-cleanups.Plo \ ./$(DEPDIR)/libutils_la-pcre2-cleanups.Plo \ @@ -278,7 +279,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -307,6 +307,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -377,6 +379,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -521,6 +524,7 @@ noinst_LTLIBRARIES = libutils.la libutils_la_SOURCES = \ cleanups.c \ cleanups.h \ + environ.c \ gnulib-cleanups.c \ guestfs-stringlists-utils.h \ guestfs-utils.h \ @@ -598,6 +602,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutils_la-cleanups.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutils_la-environ.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutils_la-gnulib-cleanups.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutils_la-libxml2-cleanups.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libutils_la-pcre2-cleanups.Plo@am__quote@ # am--include-marker @@ -641,6 +646,13 @@ libutils_la-cleanups.lo: cleanups.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutils_la_CPPFLAGS) $(CPPFLAGS) $(libutils_la_CFLAGS) $(CFLAGS) -c -o libutils_la-cleanups.lo `test -f 'cleanups.c' || echo '$(srcdir)/'`cleanups.c +libutils_la-environ.lo: environ.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutils_la_CPPFLAGS) $(CPPFLAGS) $(libutils_la_CFLAGS) $(CFLAGS) -MT libutils_la-environ.lo -MD -MP -MF $(DEPDIR)/libutils_la-environ.Tpo -c -o libutils_la-environ.lo `test -f 'environ.c' || echo '$(srcdir)/'`environ.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libutils_la-environ.Tpo $(DEPDIR)/libutils_la-environ.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='environ.c' object='libutils_la-environ.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutils_la_CPPFLAGS) $(CPPFLAGS) $(libutils_la_CFLAGS) $(CFLAGS) -c -o libutils_la-environ.lo `test -f 'environ.c' || echo '$(srcdir)/'`environ.c + libutils_la-gnulib-cleanups.lo: gnulib-cleanups.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libutils_la_CPPFLAGS) $(CPPFLAGS) $(libutils_la_CFLAGS) $(CFLAGS) -MT libutils_la-gnulib-cleanups.lo -MD -MP -MF $(DEPDIR)/libutils_la-gnulib-cleanups.Tpo -c -o libutils_la-gnulib-cleanups.lo `test -f 'gnulib-cleanups.c' || echo '$(srcdir)/'`gnulib-cleanups.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libutils_la-gnulib-cleanups.Tpo $(DEPDIR)/libutils_la-gnulib-cleanups.Plo @@ -809,6 +821,7 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ distclean: distclean-am -rm -f ./$(DEPDIR)/libutils_la-cleanups.Plo + -rm -f ./$(DEPDIR)/libutils_la-environ.Plo -rm -f ./$(DEPDIR)/libutils_la-gnulib-cleanups.Plo -rm -f ./$(DEPDIR)/libutils_la-libxml2-cleanups.Plo -rm -f ./$(DEPDIR)/libutils_la-pcre2-cleanups.Plo @@ -860,6 +873,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libutils_la-cleanups.Plo + -rm -f ./$(DEPDIR)/libutils_la-environ.Plo -rm -f ./$(DEPDIR)/libutils_la-gnulib-cleanups.Plo -rm -f ./$(DEPDIR)/libutils_la-libxml2-cleanups.Plo -rm -f ./$(DEPDIR)/libutils_la-pcre2-cleanups.Plo diff --git a/common/utils/environ.c b/common/utils/environ.c new file mode 100644 index 0000000..c3f82b5 --- /dev/null +++ b/common/utils/environ.c @@ -0,0 +1,105 @@ +/* nbdkit + * Copyright (C) 2018-2023 Red Hat Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of Red Hat nor the names of its contributors may be + * used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include +#include + +#include "guestfs-stringlists-utils.h" +#include "guestfs-utils.h" + +/* Copy an environ. Also this allows you to add (key, value) pairs to + * the environ through the varargs NULL-terminated list. Returns NULL + * if the copy or allocation failed. + */ +char ** +guestfs_int_copy_environ (char **env, ...) +{ + char **ret = NULL, **new_ret; + size_t i, len, nr_strings; + char *s; + va_list argp; + const char *key, *value; + + /* Copy the existing keys into the new vector. */ + ret = guestfs_int_copy_string_list (env); + if (ret == NULL) + return NULL; + nr_strings = guestfs_int_count_strings (ret); + + /* Add the new keys. */ + va_start (argp, env); + while ((key = va_arg (argp, const char *)) != NULL) { + value = va_arg (argp, const char *); + if (asprintf (&s, "%s=%s", key, value) == -1) { + va_end (argp); + goto error; + } + + /* Search for key in the existing environment. It's O(n^2) ... */ + len = strlen (key); + for (i = 0; ret[i] != NULL; ++i) { + if (strncmp (key, ret[i], len) == 0 && ret[i][len] == '=') { + /* Replace the existing key. */ + free (ret[i]); + ret[i] = s; + goto found; + } + } + + /* Else, append a new key to the list. */ + new_ret = realloc (ret, (nr_strings+2) * sizeof (char *)); + if (new_ret == NULL) { + free (s); + goto error; + } + ret = new_ret; + ret[nr_strings+1] = NULL; + ret[nr_strings] = s; + nr_strings++; + + found: ; + } + va_end (argp); + + /* Return the list of strings. */ + return ret; + + error: + for (i = 0; ret[i] != NULL; ++i) + free (ret[i]); + free (ret); + return NULL; +} diff --git a/common/utils/guestfs-utils.h b/common/utils/guestfs-utils.h index d568ed3..e861e7d 100644 --- a/common/utils/guestfs-utils.h +++ b/common/utils/guestfs-utils.h @@ -32,6 +32,7 @@ #ifndef GUESTFS_UTILS_H_ #define GUESTFS_UTILS_H_ +#include #include #include "guestfs-internal-all.h" @@ -109,4 +110,7 @@ extern const char *guestfs_int_strerror (int errnum, char *buf, size_t buflen); fputs ("\033[0m", (fp)); \ } while (0) +/* environ.c */ +extern char **guestfs_int_copy_environ (char **env, ...); + #endif /* GUESTFS_UTILS_H_ */ diff --git a/common/utils/utils.c b/common/utils/utils.c index 70e55cb..0144dc4 100644 --- a/common/utils/utils.c +++ b/common/utils/utils.c @@ -654,7 +654,8 @@ guestfs_int_hexdump (const void *data, size_t len, FILE *fp) const char * guestfs_int_strerror (int errnum, char *buf, size_t buflen) { -#ifdef _GNU_SOURCE +#ifdef HAVE_DECL_STRERROR_R +#ifdef STRERROR_R_CHAR_P /* GNU strerror_r */ return strerror_r (errnum, buf, buflen); #else @@ -664,4 +665,7 @@ guestfs_int_strerror (int errnum, char *buf, size_t buflen) snprintf (buf, buflen, "error number %d", errnum); return buf; #endif +#else /* !HAVE_DECL_STRERROR_R */ + return strerror (errnum); /* YOLO it. */ +#endif } diff --git a/common/visit/Makefile.in b/common/visit/Makefile.in index b7f0197..5447639 100644 --- a/common/visit/Makefile.in +++ b/common/visit/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -270,7 +270,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -299,6 +298,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -369,6 +370,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/windows/Makefile.in b/common/windows/Makefile.in index 3487545..a7339bf 100644 --- a/common/windows/Makefile.in +++ b/common/windows/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -272,7 +272,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -301,6 +300,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -371,6 +372,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/common/windows/windows.c b/common/windows/windows.c index b441097..355d79a 100644 --- a/common/windows/windows.c +++ b/common/windows/windows.c @@ -58,8 +58,6 @@ is_windows (guestfs_h *g, const char *root) return w; } -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wanalyzer-null-argument" /** * Resolves C as possible Windows path according to C, * giving a new path that can be used in libguestfs API calls. @@ -125,7 +123,6 @@ windows_path (guestfs_h *g, const char *root, const char *path, int readonly) return ret; } -#pragma GCC diagnostic pop static void mount_drive_letter (guestfs_h *g, char drive_letter, const char *root, diff --git a/config.h.in b/config.h.in index ede6413..40cf394 100644 --- a/config.h.in +++ b/config.h.in @@ -31,6 +31,10 @@ */ #undef HAVE_DCGETTEXT +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#undef HAVE_DECL_STRERROR_R + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H @@ -40,12 +44,21 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H +/* Define to 1 if you have the `error' function. */ +#undef HAVE_ERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_ERROR_H + /* Define to 1 if you have the `fsync' function. */ #undef HAVE_FSYNC /* Define to 1 if you have the `futimens' function. */ #undef HAVE_FUTIMENS +/* Define to 1 if you have the `getprogname' function. */ +#undef HAVE_GETPROGNAME + /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT @@ -157,6 +170,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H +/* Define if you have `strerror_r'. */ +#undef HAVE_STRERROR_R + /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H @@ -266,6 +282,9 @@ backward compatibility; new code need not use it. */ #undef STDC_HEADERS +/* Define to 1 if strerror_r returns char *. */ +#undef STRERROR_R_CHAR_P + /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE diff --git a/configure b/configure index e7a4e83..10c114c 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.48.3. +# Generated by GNU Autoconf 2.71 for guestfs-tools 1.50.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.48.3' -PACKAGE_STRING='guestfs-tools 1.48.3' +PACKAGE_VERSION='1.50.0' +PACKAGE_STRING='guestfs-tools 1.50.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -713,6 +713,8 @@ OCAMLOPT OCAMLLIB OCAMLVERSION OCAMLC +LIBOSINFO_LIBS +LIBOSINFO_CFLAGS JANSSON_LIBS JANSSON_CFLAGS LIBXML2_LIBS @@ -773,6 +775,7 @@ HAVE_XMLLINT_FALSE HAVE_XMLLINT_TRUE XMLLINT MKISOFS +REALPATH LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -785,7 +788,6 @@ ac_ct_AR AR DLLTOOL OBJDUMP -FILECMD LN_S NM ac_ct_DUMPBIN @@ -940,6 +942,8 @@ LIBXML2_CFLAGS LIBXML2_LIBS JANSSON_CFLAGS JANSSON_LIBS +LIBOSINFO_CFLAGS +LIBOSINFO_LIBS LIBCRYPT_CFLAGS LIBCRYPT_LIBS LIBLZMA_CFLAGS @@ -1494,7 +1498,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.48.3 to adapt to many kinds of systems. +\`configure' configures guestfs-tools 1.50.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1565,7 +1569,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of guestfs-tools 1.48.3:";; + short | recursive ) echo "Configuration of guestfs-tools 1.50.0:";; esac cat <<\_ACEOF @@ -1654,6 +1658,10 @@ Some influential environment variables: C compiler flags for JANSSON, overriding pkg-config JANSSON_LIBS linker flags for JANSSON, overriding pkg-config + LIBOSINFO_CFLAGS + C compiler flags for LIBOSINFO, overriding pkg-config + LIBOSINFO_LIBS + linker flags for LIBOSINFO, overriding pkg-config LIBCRYPT_CFLAGS C compiler flags for LIBCRYPT, overriding pkg-config LIBCRYPT_LIBS @@ -1734,7 +1742,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -guestfs-tools configure 1.48.3 +guestfs-tools configure 1.50.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2198,6 +2206,58 @@ rm -f conftest.val as_fn_set_status $ac_retval } # ac_fn_c_compute_int + +# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR +# ------------------------------------------------------------------ +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. +ac_fn_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +printf %s "checking whether $as_decl_name is declared... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + eval ac_save_FLAGS=\$$6 + as_fn_append $6 " $5" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main (void) +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$3=yes" +else $as_nop + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + eval $6=\$ac_save_FLAGS + +fi +eval ac_res=\$$3 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_check_decl ac_configure_args_raw= for ac_arg do @@ -2222,7 +2282,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.48.3, which was +It was created by guestfs-tools $as_me 1.50.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4800,7 +4860,7 @@ fi # Define the identity of the package. PACKAGE='guestfs-tools' - VERSION='1.48.3' + VERSION='1.50.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -5171,8 +5231,8 @@ esac -macro_version='2.4.7' -macro_revision='2.4.7' +macro_version='2.4.6' +macro_revision='2.4.6' @@ -5800,13 +5860,13 @@ else mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -5944,7 +6004,7 @@ esac fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -6048,7 +6108,7 @@ else $as_nop lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -6091,7 +6151,7 @@ else $as_nop sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -6296,114 +6356,6 @@ esac -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. -set dummy ${ac_tool_prefix}file; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_FILECMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$FILECMD"; then - ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_FILECMD="${ac_tool_prefix}file" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -FILECMD=$ac_cv_prog_FILECMD -if test -n "$FILECMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 -printf "%s\n" "$FILECMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_FILECMD"; then - ac_ct_FILECMD=$FILECMD - # Extract the first word of "file", so it can be a program name with args. -set dummy file; ac_word=$2 -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -printf %s "checking for $ac_word... " >&6; } -if test ${ac_cv_prog_ac_ct_FILECMD+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_FILECMD"; then - ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_FILECMD="file" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD -if test -n "$ac_ct_FILECMD"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 -printf "%s\n" "$ac_ct_FILECMD" >&6; } -else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -fi - - if test "x$ac_ct_FILECMD" = x; then - FILECMD=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - FILECMD=$ac_ct_FILECMD - fi -else - FILECMD="$ac_cv_prog_FILECMD" -fi - - - - - - - if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 @@ -6547,7 +6499,7 @@ beos*) bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='$FILECMD -L' + lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -6581,14 +6533,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -6602,7 +6554,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' @@ -6649,7 +6601,7 @@ netbsd*) newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -7022,29 +6974,13 @@ esac fi : ${AR=ar} +: ${AR_FLAGS=cru} -# Use ARFLAGS variable as AR's operation code to sync the variable naming with -# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because thats what people were doing historically (setting -# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS -# variable obsoleted/removed. - -test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} -lt_ar_flags=$AR_FLAGS - - - - - - -# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override -# by AR_FLAGS because that was never working and AR_FLAGS is about to die. - @@ -7461,7 +7397,7 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -7479,20 +7415,20 @@ fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -7516,7 +7452,7 @@ for ac_symprfx in "" "_"; do if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++ or ICC, + # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ @@ -7534,9 +7470,9 @@ for ac_symprfx in "" "_"; do " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else - lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -7739,7 +7675,7 @@ case $with_sysroot in #( fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -7864,7 +7800,7 @@ ia64-*-hpux*) ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -7885,7 +7821,7 @@ ia64-*-hpux*) printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -7897,7 +7833,7 @@ ia64-*-hpux*) ;; esac else - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -7923,7 +7859,7 @@ mips64*-*linux*) printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -7931,7 +7867,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -7939,7 +7875,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -7963,14 +7899,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -8078,7 +8014,7 @@ printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -8861,8 +8797,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 - $AR $AR_FLAGS libconftest.a conftest.o 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF @@ -8889,12 +8825,17 @@ printf "%s\n" "$lt_cv_ld_force_load" >&6; } _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) - case $MACOSX_DEPLOYMENT_TARGET,$host in - 10.[012],*|,*powerpc*-darwin[5-8]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[012][,.]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -9253,8 +9194,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC and -# ICC, which need '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -9766,7 +9707,7 @@ lt_prog_compiler_static= lt_prog_compiler_static='-qstaticlink' ;; *) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' @@ -10189,15 +10130,15 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) + # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -10249,7 +10190,7 @@ printf %s "checking whether the $compiler linker ($LD) supports shared libraries whole_archive_flag_spec= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -10361,7 +10302,6 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes - file_list_spec='@' ;; interix[3-9]*) @@ -10376,7 +10316,7 @@ _LT_EOF # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -10419,7 +10359,7 @@ _LT_EOF compiler_needs_object=yes ;; esac - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes @@ -10431,7 +10371,7 @@ _LT_EOF if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -10447,7 +10387,7 @@ _LT_EOF archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -10579,7 +10519,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -10850,12 +10790,12 @@ fi cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl* | icl*) - # Native MSVC or ICC + cl*) + # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes @@ -10896,7 +10836,7 @@ fi fi' ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. @@ -10937,8 +10877,8 @@ fi output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no @@ -10972,7 +10912,7 @@ fi ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly* | midnightbsd*) + freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -11223,7 +11163,6 @@ printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes - file_list_spec='@' ;; osf3*) @@ -11916,7 +11855,7 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; @@ -11926,14 +11865,14 @@ cygwin* | mingw* | pw32* | cegcc*) ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl*) - # Native MSVC or ICC + *,cl*) + # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -11952,7 +11891,7 @@ cygwin* | mingw* | pw32* | cegcc*) done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -11989,7 +11928,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -12022,7 +11961,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -13178,41 +13117,30 @@ striplib= old_striplib= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } -if test -z "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } -else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - else - case $host_os in - darwin*) - # FIXME - insert some real tests, host_os isn't really good enough +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } - ;; - freebsd*) - if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - fi - ;; - *) + else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; - esac - fi + fi + ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + ;; + esac fi @@ -13305,7 +13233,7 @@ CC=$lt_save_CC printf "%s\n" printf "%s\n" "--- Checking for external programs ---" # libguestfs -# Copyright (C) 2009-2021 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -13472,6 +13400,57 @@ printf "%s\n" "no, using $LN_S" >&6; } fi +for ac_prog in grealpath realpath +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_REALPATH+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$REALPATH"; then + ac_cv_prog_REALPATH="$REALPATH" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_REALPATH="$ac_prog" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +REALPATH=$ac_cv_prog_REALPATH +if test -n "$REALPATH"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $REALPATH" >&5 +printf "%s\n" "$REALPATH" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + + test -n "$REALPATH" && break +done +test -n "$REALPATH" || REALPATH="no" + +test "x$REALPATH" = "xno" && + as_fn_error $? "GNU realpath program must be installed" "$LINENO" 5 + for ac_prog in xorrisofs genisoimage mkisofs do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -14177,7 +14156,7 @@ fi printf "%s\n" printf "%s\n" "--- Checking for the C compiler environment ---" # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -14671,7 +14650,7 @@ CFLAGS="${acx_nbdkit_save_CFLAGS}" printf "%s\n" printf "%s\n" "--- Checking for libraries used by libguestfs ---" # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -14827,12 +14806,12 @@ if test -n "$LIBGUESTFS_CFLAGS"; then pkg_cv_LIBGUESTFS_CFLAGS="$LIBGUESTFS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libguestfs >= 1.44\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libguestfs >= 1.44") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libguestfs >= 1.49.8\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libguestfs >= 1.49.8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBGUESTFS_CFLAGS=`$PKG_CONFIG --cflags "libguestfs >= 1.44" 2>/dev/null` + pkg_cv_LIBGUESTFS_CFLAGS=`$PKG_CONFIG --cflags "libguestfs >= 1.49.8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -14844,12 +14823,12 @@ if test -n "$LIBGUESTFS_LIBS"; then pkg_cv_LIBGUESTFS_LIBS="$LIBGUESTFS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libguestfs >= 1.44\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libguestfs >= 1.44") 2>&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libguestfs >= 1.49.8\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libguestfs >= 1.49.8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBGUESTFS_LIBS=`$PKG_CONFIG --libs "libguestfs >= 1.44" 2>/dev/null` + pkg_cv_LIBGUESTFS_LIBS=`$PKG_CONFIG --libs "libguestfs >= 1.49.8" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -14870,14 +14849,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBGUESTFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libguestfs >= 1.44" 2>&1` + LIBGUESTFS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libguestfs >= 1.49.8" 2>&1` else - LIBGUESTFS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libguestfs >= 1.44" 2>&1` + LIBGUESTFS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libguestfs >= 1.49.8" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGUESTFS_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (libguestfs >= 1.44) were not met: + as_fn_error $? "Package requirements (libguestfs >= 1.49.8) were not met: $LIBGUESTFS_PKG_ERRORS @@ -14910,6 +14889,148 @@ printf "%s\n" "yes" >&6; } fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 +printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } +if test ${ac_cv_c_undeclared_builtin_options+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_save_CFLAGS=$CFLAGS + ac_cv_c_undeclared_builtin_options='cannot detect' + for ac_arg in '' -fno-builtin; do + CFLAGS="$ac_save_CFLAGS $ac_arg" + # This test program should *not* compile successfully. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ +(void) strchr; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + +else $as_nop + # This test program should compile successfully. + # No library function is consistently available on + # freestanding implementations, so test against a dummy + # declaration. Include always-available headers on the + # off chance that they somehow elicit warnings. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +extern void ac_decl (int, char *); + +int +main (void) +{ +(void) ac_decl (0, (char *) 0); + (void) ac_decl; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + if test x"$ac_arg" = x +then : + ac_cv_c_undeclared_builtin_options='none needed' +else $as_nop + ac_cv_c_undeclared_builtin_options=$ac_arg +fi + break +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + done + CFLAGS=$ac_save_CFLAGS + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 +printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } + case $ac_cv_c_undeclared_builtin_options in #( + 'cannot detect') : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot make $CC report undeclared builtins +See \`config.log' for more details" "$LINENO" 5; } ;; #( + 'none needed') : + ac_c_undeclared_builtin_options='' ;; #( + *) : + ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; +esac + +ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" +if test "x$ac_cv_have_decl_strerror_r" = xyes +then : + ac_have_decl=1 +else $as_nop + ac_have_decl=0 +fi +printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h + + +if test $ac_cv_have_decl_strerror_r = yes; then + # For backward compatibility's sake, define HAVE_STRERROR_R. + # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well + # as AC_CHECK_DECLS_ONCE.) + +printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h + +fi + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 +printf %s "checking whether strerror_r returns char *... " >&6; } +if test ${ac_cv_func_strerror_r_char_p+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ac_cv_func_strerror_r_char_p=no + if test $ac_cv_have_decl_strerror_r = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main (void) +{ + + char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + char *p = strerror_r (0, buf, sizeof buf); + return !p || x; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_func_strerror_r_char_p=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 +printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; } +if test $ac_cv_func_strerror_r_char_p = yes; then + +printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h + +fi + + printf "%s\n" "#define host_cpu \"$host_cpu\"" >>confdefs.h @@ -14926,10 +15047,10 @@ then : printf "%s\n" "#define HAVE_ENDIAN_H 1" >>confdefs.h fi -ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_endian_h" = xyes +ac_fn_c_check_header_compile "$LINENO" "error.h" "ac_cv_header_error_h" "$ac_includes_default" +if test "x$ac_cv_header_error_h" = xyes then : - printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h + printf "%s\n" "#define HAVE_ERROR_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" @@ -14967,6 +15088,12 @@ if test "x$ac_cv_header_printf_h" = xyes then : printf "%s\n" "#define HAVE_PRINTF_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_endian_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default" if test "x$ac_cv_header_sys_inotify_h" = xyes @@ -15053,6 +15180,12 @@ if test "x$ac_cv_func_be32toh" = xyes then : printf "%s\n" "#define HAVE_BE32TOH 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "error" "ac_cv_func_error" +if test "x$ac_cv_func_error" = xyes +then : + printf "%s\n" "#define HAVE_ERROR 1" >>confdefs.h + fi ac_fn_c_check_func "$LINENO" "fsync" "ac_cv_func_fsync" if test "x$ac_cv_func_fsync" = xyes @@ -15065,6 +15198,12 @@ if test "x$ac_cv_func_futimens" = xyes then : printf "%s\n" "#define HAVE_FUTIMENS 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "getprogname" "ac_cv_func_getprogname" +if test "x$ac_cv_func_getprogname" = xyes +then : + printf "%s\n" "#define HAVE_GETPROGNAME 1" >>confdefs.h + fi ac_fn_c_check_func "$LINENO" "getxattr" "ac_cv_func_getxattr" if test "x$ac_cv_func_getxattr" = xyes @@ -17345,6 +17484,7 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 @@ -18373,8 +18513,7 @@ printf "%s\n" "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools \ - && test "$PACKAGE" != libintl; }; then + && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else LIBINTL= @@ -18468,9 +18607,7 @@ printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h - - INTLLIBS="$LIBINTL" - + INTLLIBS="$LIBINTL" @@ -18976,10 +19113,102 @@ printf "%s\n" "yes" >&6; } fi +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBOSINFO" >&5 +printf %s "checking for LIBOSINFO... " >&6; } + +if test -n "$LIBOSINFO_CFLAGS"; then + pkg_cv_LIBOSINFO_CFLAGS="$LIBOSINFO_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libosinfo-1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libosinfo-1.0") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBOSINFO_CFLAGS=`$PKG_CONFIG --cflags "libosinfo-1.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBOSINFO_LIBS"; then + pkg_cv_LIBOSINFO_LIBS="$LIBOSINFO_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libosinfo-1.0\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libosinfo-1.0") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBOSINFO_LIBS=`$PKG_CONFIG --libs "libosinfo-1.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBOSINFO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libosinfo-1.0" 2>&1` + else + LIBOSINFO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libosinfo-1.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBOSINFO_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements (libosinfo-1.0) were not met: + +$LIBOSINFO_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables LIBOSINFO_CFLAGS +and LIBOSINFO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details." "$LINENO" 5 +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables LIBOSINFO_CFLAGS +and LIBOSINFO_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + LIBOSINFO_CFLAGS=$pkg_cv_LIBOSINFO_CFLAGS + LIBOSINFO_LIBS=$pkg_cv_LIBOSINFO_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +fi + + printf "%s\n" printf "%s\n" "--- Checking for OCaml compiler and libguestfs bindings ---" # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -18999,7 +19228,7 @@ printf "%s\n" # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -20474,7 +20703,7 @@ OCAML_FLAGS="-g -annot $safe_string_option" printf "%s\n" printf "%s\n" "--- Checking for Perl ---" # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -20631,7 +20860,7 @@ fi printf "%s\n" printf "%s\n" "--- Checking for other libraries ---" # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -20967,7 +21196,7 @@ fi printf "%s\n" printf "%s\n" "--- Checking for bash completion ---" # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -21118,7 +21347,7 @@ 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 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" +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/mldrivers/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 drivers/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 @@ -21704,7 +21933,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.48.3, which was +This file was extended by guestfs-tools $as_me 1.50.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21772,7 +22001,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.48.3 +guestfs-tools config.status 1.50.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" @@ -21935,7 +22164,6 @@ lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_q lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' @@ -21944,7 +22172,6 @@ want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' @@ -22065,7 +22292,6 @@ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ -FILECMD \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ @@ -22074,6 +22300,7 @@ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ +AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ @@ -22214,6 +22441,7 @@ do "cat/Makefile") CONFIG_FILES="$CONFIG_FILES cat/Makefile" ;; "common/edit/Makefile") CONFIG_FILES="$CONFIG_FILES common/edit/Makefile" ;; "common/mlcustomize/Makefile") CONFIG_FILES="$CONFIG_FILES common/mlcustomize/Makefile" ;; + "common/mldrivers/Makefile") CONFIG_FILES="$CONFIG_FILES common/mldrivers/Makefile" ;; "common/mlgettext/Makefile") CONFIG_FILES="$CONFIG_FILES common/mlgettext/Makefile" ;; "common/mlpcre/Makefile") CONFIG_FILES="$CONFIG_FILES common/mlpcre/Makefile" ;; "common/mlprogress/Makefile") CONFIG_FILES="$CONFIG_FILES common/mlprogress/Makefile" ;; @@ -22236,6 +22464,7 @@ do "df/Makefile") CONFIG_FILES="$CONFIG_FILES df/Makefile" ;; "dib/Makefile") CONFIG_FILES="$CONFIG_FILES dib/Makefile" ;; "diff/Makefile") CONFIG_FILES="$CONFIG_FILES diff/Makefile" ;; + "drivers/Makefile") CONFIG_FILES="$CONFIG_FILES drivers/Makefile" ;; "edit/Makefile") CONFIG_FILES="$CONFIG_FILES edit/Makefile" ;; "format/Makefile") CONFIG_FILES="$CONFIG_FILES format/Makefile" ;; "get-kernel/Makefile") CONFIG_FILES="$CONFIG_FILES get-kernel/Makefile" ;; @@ -23082,9 +23311,6 @@ to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd -# A file(cmd) program that detects file types. -FILECMD=$lt_FILECMD - # An object symbol dumper. OBJDUMP=$lt_OBJDUMP @@ -23109,11 +23335,8 @@ sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR -# Flags to create an archive (by configure). -lt_ar_flags=$lt_ar_flags - # Flags to create an archive. -AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} +AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec @@ -23489,7 +23712,7 @@ ltmain=$ac_aux_dir/ltmain.sh # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - $SED '$q' "$ltmain" >> "$cfgfile" \ + sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || diff --git a/configure.ac b/configure.ac index 32b6fd4..1f8acce 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2021 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -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.48.3]) +AC_INIT([guestfs-tools], [1.50.0]) dnl The common/ subdirectory assumes this. In libguestfs it contains dnl the --with-extra parameter. Here we just define it to the version. @@ -115,6 +115,7 @@ AC_CONFIG_FILES([Makefile cat/Makefile common/edit/Makefile common/mlcustomize/Makefile + common/mldrivers/Makefile common/mlgettext/Makefile common/mlpcre/Makefile common/mlprogress/Makefile @@ -137,6 +138,7 @@ AC_CONFIG_FILES([Makefile df/Makefile dib/Makefile diff/Makefile + drivers/Makefile edit/Makefile format/Makefile get-kernel/Makefile diff --git a/customize/Makefile.am b/customize/Makefile.am index 6bdd5fa..3a97459 100644 --- a/customize/Makefile.am +++ b/customize/Makefile.am @@ -1,5 +1,5 @@ # virt-customize -# Copyright (C) 2014-2020 Red Hat Inc. +# Copyright (C) 2014-2023 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 @@ -107,6 +107,7 @@ libcustomize_a_CFLAGS = \ $(LIBCRYPT_CFLAGS) \ $(LIBVIRT_CFLAGS) \ $(LIBXML2_CFLAGS) \ + $(LIBOSINFO_CFLAGS) \ -fPIC BOBJECTS = $(SOURCES_ML:.ml=.cmo) @@ -127,6 +128,7 @@ OCAMLPACKAGES = \ -I $(top_builddir)/common/mlutils \ -I $(top_builddir)/common/mlgettext \ -I $(top_builddir)/common/mlpcre \ + -I $(top_builddir)/common/mlxml \ -I $(top_builddir)/common/mltools \ -I $(top_builddir)/common/mlcustomize \ -I $(builddir) @@ -159,6 +161,7 @@ OCAMLLINKFLAGS = \ mlguestfs.$(MLARCHIVE) \ mlgettext.$(MLARCHIVE) \ mlpcre.$(MLARCHIVE) \ + mlxml.$(MLARCHIVE) \ mlcutils.$(MLARCHIVE) \ mltools.$(MLARCHIVE) \ mlcustomize.$(MLARCHIVE) \ @@ -173,6 +176,7 @@ OCAMLCLIBS = \ $(LIBCRYPT_LIBS) \ $(LIBVIRT_LIBS) \ $(LIBXML2_LIBS) \ + $(LIBOSINFO_LIBS) \ $(LIBINTL) \ -lgnu @@ -186,6 +190,7 @@ virt_customize_DEPENDENCIES = \ ../common/mlutils/mlcutils.$(MLARCHIVE) \ ../common/mlgettext/mlgettext.$(MLARCHIVE) \ ../common/mlpcre/mlpcre.$(MLARCHIVE) \ + ../common/mlxml/mlxml.$(MLARCHIVE) \ ../common/mltools/mltools.$(MLARCHIVE) \ ../common/mlcustomize/mlcustomize.$(MLARCHIVE) virt_customize_LINK = \ diff --git a/customize/Makefile.in b/customize/Makefile.in index f4bf6b3..5bf84ec 100644 --- a/customize/Makefile.in +++ b/customize/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # virt-customize -# Copyright (C) 2014-2020 Red Hat Inc. +# Copyright (C) 2014-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -509,7 +509,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -538,6 +537,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -608,6 +609,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -825,6 +827,7 @@ BUILT_SOURCES = \ @HAVE_OCAML_TRUE@ $(LIBCRYPT_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBVIRT_CFLAGS) \ @HAVE_OCAML_TRUE@ $(LIBXML2_CFLAGS) \ +@HAVE_OCAML_TRUE@ $(LIBOSINFO_CFLAGS) \ @HAVE_OCAML_TRUE@ -fPIC @HAVE_OCAML_TRUE@BOBJECTS = $(SOURCES_ML:.ml=.cmo) @@ -839,6 +842,7 @@ BUILT_SOURCES = \ @HAVE_OCAML_TRUE@ $(top_builddir)/common/mlutils -I \ @HAVE_OCAML_TRUE@ $(top_builddir)/common/mlgettext -I \ @HAVE_OCAML_TRUE@ $(top_builddir)/common/mlpcre -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/mlxml -I \ @HAVE_OCAML_TRUE@ $(top_builddir)/common/mltools -I \ @HAVE_OCAML_TRUE@ $(top_builddir)/common/mlcustomize -I \ @HAVE_OCAML_TRUE@ $(builddir) $(am__append_1) @@ -853,6 +857,7 @@ BUILT_SOURCES = \ @HAVE_OCAML_TRUE@ mlguestfs.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ mlgettext.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ mlpcre.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ mlxml.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ mlcutils.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ mltools.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ mlcustomize.$(MLARCHIVE) \ @@ -867,6 +872,7 @@ BUILT_SOURCES = \ @HAVE_OCAML_TRUE@ $(LIBCRYPT_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBVIRT_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBXML2_LIBS) \ +@HAVE_OCAML_TRUE@ $(LIBOSINFO_LIBS) \ @HAVE_OCAML_TRUE@ $(LIBINTL) \ @HAVE_OCAML_TRUE@ -lgnu @@ -879,6 +885,7 @@ BUILT_SOURCES = \ @HAVE_OCAML_TRUE@ ../common/mlutils/mlcutils.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ ../common/mlgettext/mlgettext.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ ../common/mlpcre/mlpcre.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ ../common/mlxml/mlxml.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ ../common/mltools/mltools.$(MLARCHIVE) \ @HAVE_OCAML_TRUE@ ../common/mlcustomize/mlcustomize.$(MLARCHIVE) diff --git a/customize/customize_cmdline.ml b/customize/customize_cmdline.ml index 9326baa..3c24315 100644 --- a/customize/customize_cmdline.ml +++ b/customize/customize_cmdline.ml @@ -4,7 +4,7 @@ * and from the code in the generator/ subdirectory. * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. * - * Copyright (C) 2009-2020 Red Hat Inc. + * Copyright (C) 2009-2023 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 @@ -59,6 +59,10 @@ and op = [ (* --firstboot-install PKG,PKG.. *) | `Hostname of string (* --hostname HOSTNAME *) + | `InjectQemuGA of string + (* --inject-qemu-ga METHOD *) + | `InjectVirtioWin of string + (* --inject-virtio-win METHOD *) | `InstallPackages of string list (* --install PKG,PKG.. *) | `Link of string * string list @@ -109,7 +113,9 @@ and flags = { (* --no-logfile *) password_crypto : Password.password_crypto option; (* --password-crypto md5|sha256|sha512 *) - selinux_relabel : bool; + no_selinux_relabel : bool; + (* --no-selinux-relabel *) + selinux_relabel_ignored : bool; (* --selinux-relabel *) sm_credentials : Subscription_manager.sm_credentials option; (* --sm-credentials SELECTOR *) @@ -121,7 +127,8 @@ let rec argspec () = let ops = ref [] in let scrub_logfile = ref false in let password_crypto = ref None in - let selinux_relabel = ref false in + let no_selinux_relabel = ref false in + let selinux_relabel_ignored = ref false in let sm_credentials = ref None in let rec get_ops () = { @@ -131,7 +138,8 @@ let rec argspec () = and get_flags () = { scrub_logfile = !scrub_logfile; password_crypto = !password_crypto; - selinux_relabel = !selinux_relabel; + no_selinux_relabel = !no_selinux_relabel; + selinux_relabel_ignored = !selinux_relabel_ignored; sm_credentials = !sm_credentials; } in @@ -258,6 +266,18 @@ let rec argspec () = s_"Set the hostname" ), Some "HOSTNAME", "Set the hostname of the guest to C. You can use a\ndotted hostname.domainname (FQDN) if you want."; + ( + [ L"inject-qemu-ga" ], + Getopt.String (s_"METHOD", fun s -> List.push_front (`InjectQemuGA s) ops), + s_"Inject the QEMU Guest Agent into a Windows guest" + ), + Some "METHOD", "Inject the QEMU Guest Agent into a Windows guest. The guest\nagent communicates with qemu through a socket in order to\nprovide enhanced features (see L). This operation\nalso injects a firstboot script so that the Guest Agent is\ninstalled when the guest boots.\n\nThe parameter is the same as used by the I<--inject-virtio-win> operation.\n\nNote that to do a full conversion of a Windows guest from a\nforeign hypervisor like VMware (which involves many other operations)\nyou should use the L tool instead of this."; + ( + [ L"inject-virtio-win" ], + Getopt.String (s_"METHOD", fun s -> List.push_front (`InjectVirtioWin s) ops), + s_"Inject virtio-win drivers into a Windows guest" + ), + Some "METHOD", "Inject virtio-win drivers into a Windows guest. These drivers\nadd virtio accelerated drivers suitable when running on top of\na hypervisor that supports virtio (such as qemu/KVM). The\noperation also adjusts the Windows Registry so that the drivers\nare installed when the guest boots.\n\nThe parameter can be one of:\n\n=over 4\n\n=item ISO\n\nThe path to the ISO image containing the virtio-win drivers\n(eg. F).\n\n=item DIR\n\nThe directory containing the unpacked virtio-win drivers\n(eg. F).\n\n=item B<\"osinfo\">\n\nThe literal string C<\"osinfo\"> means to use the\nlibosinfo database to locate the drivers. (See\nL.\n\n=back\n\nNote that to do a full conversion of a Windows guest from a\nforeign hypervisor like VMware (which involves many other operations)\nyou should use the L tool instead of this."; ( [ L"install" ], Getopt.String ( @@ -458,12 +478,18 @@ let rec argspec () = s_"Set password crypto" ), Some "md5|sha256|sha512", "When the virt tools change or set a password in the guest, this\noption sets the password encryption of that password to\nC, C or C.\n\nC and C require glibc E 2.7 (check crypt(3) inside\nthe guest).\n\nC will work with relatively old Linux guests (eg. RHEL 3), but\nis not secure against modern attacks.\n\nThe default is C unless libguestfs detects an old guest that\ndidn't have support for SHA-512, in which case it will use C.\nYou can override libguestfs by specifying this option.\n\nNote this does not change the default password encryption used\nby the guest when you create new user accounts inside the guest.\nIf you want to do that, then you should use the I<--edit> option\nto modify C (Fedora, RHEL) or\nC (Debian, Ubuntu)."; + ( + [ L"no-selinux-relabel" ], + Getopt.Set no_selinux_relabel, + s_"Do not relabel files with correct SELinux labels" + ), + None, "Do not attempt to correct the SELinux labels of files in the guest.\n\nIn such guests that support SELinux, customization automatically\nrelabels files so that they have the correct SELinux label. (The\nrelabeling is performed immediately, but if the operation fails,\ncustomization will instead touch F on the image to\nschedule a relabel operation for the next time the image boots.) This\noption disables the automatic relabeling.\n\nThe option is a no-op for guests that do not support SELinux."; ( [ L"selinux-relabel" ], - Getopt.Set selinux_relabel, - s_"Relabel files with correct SELinux labels" + Getopt.Set selinux_relabel_ignored, + s_"Compatibility option doing nothing" ), - None, "Relabel files in the guest so that they have the correct SELinux label.\n\nThis will attempt to relabel files immediately, but if the operation fails\nthis will instead touch F on the image to schedule a\nrelabel operation for the next time the image boots.\n\nYou should only use this option for guests which support SELinux."; + None, "This is a compatibility option that does nothing."; ( [ L"sm-credentials" ], Getopt.String ( diff --git a/customize/customize_cmdline.mli b/customize/customize_cmdline.mli index 14eda49..0cc166e 100644 --- a/customize/customize_cmdline.mli +++ b/customize/customize_cmdline.mli @@ -4,7 +4,7 @@ * and from the code in the generator/ subdirectory. * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. * - * Copyright (C) 2009-2020 Red Hat Inc. + * Copyright (C) 2009-2023 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 @@ -51,6 +51,10 @@ and op = [ (* --firstboot-install PKG,PKG.. *) | `Hostname of string (* --hostname HOSTNAME *) + | `InjectQemuGA of string + (* --inject-qemu-ga METHOD *) + | `InjectVirtioWin of string + (* --inject-virtio-win METHOD *) | `InstallPackages of string list (* --install PKG,PKG.. *) | `Link of string * string list @@ -101,7 +105,9 @@ and flags = { (* --no-logfile *) password_crypto : Password.password_crypto option; (* --password-crypto md5|sha256|sha512 *) - selinux_relabel : bool; + no_selinux_relabel : bool; + (* --no-selinux-relabel *) + selinux_relabel_ignored : bool; (* --selinux-relabel *) sm_credentials : Subscription_manager.sm_credentials option; (* --sm-credentials SELECTOR *) diff --git a/customize/customize_main.ml b/customize/customize_main.ml index 8a02234..f05375e 100644 --- a/customize/customize_main.ml +++ b/customize/customize_main.ml @@ -52,7 +52,11 @@ let main () = let libvirturi = ref "" in let memsize = ref None in let set_memsize arg = memsize := Some arg in + + (* Note that [--key ID:clevis] depends on this default. See more below, near + * [g#set_network network]. *) let network = ref true in + let smp = ref None in let set_smp arg = smp := Some arg in @@ -60,8 +64,8 @@ let main () = let uri = try URI.parse_uri arg with URI.Parse_failed -> - error (f_"error parsing URI '%s'. Look for error messages printed above.") - arg in + error (f_"error parsing URI '%s'. \ + Look for error messages printed above.") arg in let format = match !format with "auto" -> None | fmt -> Some fmt in List.push_front (uri, format) files; format_consumed := true @@ -118,7 +122,8 @@ read the man page virt-customize(1). let add = match files, domain with | [], None -> - error (f_"you must give either -a or -d options. Read virt-customize(1) man page for further information.") + error (f_"you must give either -a or -d options. \ + Read virt-customize(1) man page for further information.") | [], Some dom -> fun (g : Guestfs.guestfs) readonly -> let allowuuid = true in @@ -129,7 +134,8 @@ read the man page virt-customize(1). ?libvirturi ~allowuuid ~readonlydisk dom) | _::_, Some _ -> - error (f_"you cannot give -a and -d options together. Read virt-customize(1) man page for further information.") + error (f_"you cannot give -a and -d options together. \ + Read virt-customize(1) man page for further information.") | (_::_) as files, None -> fun g readonly -> List.iter ( @@ -159,6 +165,10 @@ read the man page virt-customize(1). let g = open_guestfs () in Option.may g#set_memsize memsize; Option.may g#set_smp smp; + (* [--no-network] from the command line takes precedence over the automatic + * network enablement for [--key ID:clevis], so here we intentionally + * don't check [key_store_requires_network opthandle.ks]. + *) g#set_network network; (* Add disks. *) diff --git a/customize/customize_main.mli b/customize/customize_main.mli index 7f60d24..428ef53 100644 --- a/customize/customize_main.mli +++ b/customize/customize_main.mli @@ -1,5 +1,5 @@ (* virt-customize - * Copyright (C) 2014-2020 Red Hat Inc. + * Copyright (C) 2014-2023 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 diff --git a/customize/customize_run.ml b/customize/customize_run.ml index b365413..f03774e 100644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -50,7 +50,10 @@ let run (g : G.guestfs) root (ops : ops) = let do_run ~display ?(warn_failed_no_network = false) cmd = let incompatible_fn () = let guest_arch = g#inspect_get_arch root in - error (f_"host cpu (%s) and guest arch (%s) are not compatible, so you cannot use command line options that involve running commands in the guest. Use --firstboot scripts instead.") + error (f_"host cpu (%s) and guest arch (%s) are not compatible, \ + so you cannot use command line options that involve \ + running commands in the guest. Use --firstboot scripts \ + instead.") Guestfs_config.host_cpu guest_arch in @@ -61,105 +64,19 @@ let run (g : G.guestfs) root (ops : ops) = debug_logfile (); if warn_failed_no_network && not (g#get_network ()) then ( prerr_newline (); - warning (f_"the command may have failed because the network is disabled. Try either removing ‘--no-network’ or adding ‘--network’ on the command line."); + warning (f_"the command may have failed because the network is \ + disabled. Try either removing ‘--no-network’ or \ + adding ‘--network’ on the command line."); prerr_newline () ); error (f_"%s: command exited with an error") display in - (* http://distrowatch.com/dwres.php?resource=package-management *) - let rec guest_install_command packages = - let quoted_args = String.concat " " (List.map quote packages) in - match g#inspect_get_package_management root with - | "apk" -> - sprintf " - apk update - apk add %s - " quoted_args - | "apt" -> - (* http://unix.stackexchange.com/questions/22820 *) - sprintf " - export DEBIAN_FRONTEND=noninteractive - apt_opts='-q -y -o Dpkg::Options::=--force-confnew' - apt-get $apt_opts update - apt-get $apt_opts install %s - " quoted_args - | "dnf" -> - sprintf "dnf%s -y install %s" - (if verbose () then " --verbose" else "") - quoted_args - | "pisi" -> sprintf "pisi it %s" quoted_args - | "pacman" -> sprintf "pacman -S --noconfirm %s" quoted_args - | "urpmi" -> sprintf "urpmi %s" quoted_args - | "xbps" -> sprintf "xbps-install -Sy %s" quoted_args - | "yum" -> sprintf "yum -y install %s" quoted_args - | "zypper" -> sprintf "zypper -n in -l %s" quoted_args - - | "unknown" -> - error_unknown_package_manager (s_"--install") - | pm -> - error_unimplemented_package_manager (s_"--install") pm - - and guest_update_command () = - match g#inspect_get_package_management root with - | "apk" -> - " - apk update - apk upgrade - " - | "apt" -> - (* http://unix.stackexchange.com/questions/22820 *) - " - export DEBIAN_FRONTEND=noninteractive - apt_opts='-q -y -o Dpkg::Options::=--force-confnew' - apt-get $apt_opts update - apt-get $apt_opts upgrade - " - | "dnf" -> - sprintf "dnf%s -y --best upgrade" - (if verbose () then " --verbose" else "") - | "pisi" -> "pisi upgrade" - | "pacman" -> "pacman -Su" - | "urpmi" -> "urpmi --auto-select" - | "xbps" -> "xbps-install -Suy" - | "yum" -> "yum -y update" - | "zypper" -> "zypper -n update -l" - - | "unknown" -> - error_unknown_package_manager (s_"--update") - | pm -> - error_unimplemented_package_manager (s_"--update") pm - - and guest_uninstall_command packages = - let quoted_args = String.concat " " (List.map quote packages) in - match g#inspect_get_package_management root with - | "apk" -> sprintf "apk del %s" quoted_args - | "apt" -> - (* http://unix.stackexchange.com/questions/22820 *) - sprintf " - export DEBIAN_FRONTEND=noninteractive - apt_opts='-q -y -o Dpkg::Options::=--force-confnew' - apt-get $apt_opts remove %s - " quoted_args - | "dnf" -> sprintf "dnf -y remove %s" quoted_args - | "pisi" -> sprintf "pisi rm %s" quoted_args - | "pacman" -> sprintf "pacman -R %s" quoted_args - | "urpmi" -> sprintf "urpme %s" quoted_args - | "xbps" -> sprintf "xbps-remove -Sy %s" quoted_args - | "yum" -> sprintf "yum -y remove %s" quoted_args - | "zypper" -> sprintf "zypper -n rm %s" quoted_args - - | "unknown" -> - error_unknown_package_manager (s_"--uninstall") - | pm -> - error_unimplemented_package_manager (s_"--uninstall") pm - - (* Windows has package_management == "unknown". *) - and error_unknown_package_manager flag = - error (f_"cannot use ‘%s’ because no package manager has been detected for this guest OS.\n\nIf this guest OS is a common one with ordinary package management then this may have been caused by a failure of libguestfs inspection.\n\nFor OSes such as Windows that lack package management, this is not possible. Try using one of the ‘--firstboot*’ flags instead (described in the manual).") flag - - and error_unimplemented_package_manager flag pm = - error (f_"sorry, ‘%s’ with the ‘%s’ package manager has not been implemented yet.\n\nYou can work around this by using one of the ‘--run*’ or ‘--firstboot*’ options instead (described in the manual).") flag pm + let guest_pkgs_command f = + try f (g#inspect_get_package_management root) with + | Guest_packages.Unknown_package_manager msg + | Guest_packages.Unimplemented_package_manager msg -> + error "%s" msg in (* Set the random seed. *) @@ -191,10 +108,28 @@ let run (g : G.guestfs) root (ops : ops) = let passwords = Hashtbl.create 13 in let set_password user pw = if Hashtbl.mem passwords user then - error (f_"multiple --root-password/--password options set the password for user ‘%s’ twice") user; + error (f_"multiple --root-password/--password options set the \ + password for user ‘%s’ twice") user; Hashtbl.replace passwords user pw in + (* Helper function to convert --inject-qemu-ga/--inject-virtio-win + * method parameter into a virtio-win handle. + *) + let get_virtio_win_handle op meth = + if g#inspect_get_type root <> "windows" then ( + warning (f_"%s ignored for non-Windows guest") op; + None + ) + else ( + match meth with + | "osinfo" | "libosinfo" -> + Some (Inject_virtio_win.from_libosinfo g root) + | path -> + Some (Inject_virtio_win.from_path g root path) + ) + in + (* Perform the remaining customizations in command-line order. *) List.iter ( function @@ -203,7 +138,9 @@ let run (g : G.guestfs) root (ops : ops) = * to prevent incorrect line endings being added to a file. *) if String.contains line '\n' then - error (f_"--append-line: line must not contain newline characters. Use the --append-line option multiple times to add several lines."); + error (f_"--append-line: line must not contain newline characters. \ + Use the --append-line option multiple times to add \ + several lines."); message (f_"Appending line to %s") path; append_line g root path line @@ -255,7 +192,7 @@ let run (g : G.guestfs) root (ops : ops) = | `FirstbootPackages pkgs -> message (f_"Installing firstboot packages: %s") (String.concat " " pkgs); - let cmd = guest_install_command pkgs in + let cmd = guest_pkgs_command (Guest_packages.install_command pkgs) in let name = String.concat " " ("install" :: pkgs) in Firstboot.add_firstboot_script g root name cmd @@ -269,9 +206,36 @@ let run (g : G.guestfs) root (ops : ops) = if not (Hostname.set_hostname g root hostname) then warning (f_"hostname could not be set for this type of guest") + | `InjectQemuGA meth -> + (match get_virtio_win_handle "--inject-qemu-ga" meth with + | None -> () + | Some t -> + if not (Inject_virtio_win.inject_qemu_ga t) then + warning (f_"--inject-qemu-ga: QEMU Guest Agent MSI not found in \ + virtio-win source that you specified") + ) + + | `InjectVirtioWin meth -> + (match get_virtio_win_handle "--inject-virtio-win" meth with + | None -> () + | Some t -> + let windows_system_hive = g#inspect_get_windows_system_hive root in + Registry.with_hive_write g windows_system_hive ( + fun reg -> + let installed = + Inject_virtio_win.inject_virtio_win_drivers t reg in + + (* Warn if we didn't install at least the virtio-blk driver. *) + if installed.block_driver <> Inject_virtio_win.Virtio_blk then + warning (f_"--inject-virtio-win: virtio drivers were not \ + found for this Windows version in the \ + virtio-win source that you specified") + ) + ) + | `InstallPackages pkgs -> message (f_"Installing packages: %s") (String.concat " " pkgs); - let cmd = guest_install_command pkgs in + let cmd = guest_pkgs_command (Guest_packages.install_command pkgs) in do_run ~display:cmd ~warn_failed_no_network:true cmd | `Link (target, links) -> @@ -321,9 +285,11 @@ let run (g : G.guestfs) root (ops : ops) = let creds = match ops.flags.sm_credentials with | None -> - error (f_"subscription-manager credentials required for --sm-register") + error (f_"subscription-manager credentials required for \ + --sm-register") | Some c -> c in - let cmd = sprintf "subscription-manager register --username=%s --password=%s" + let cmd = sprintf "subscription-manager register \ + --username=%s --password=%s" (quote creds.Subscription_manager.sm_username) (quote creds.Subscription_manager.sm_password) in do_run ~display:"subscription-manager register" @@ -365,12 +331,12 @@ let run (g : G.guestfs) root (ops : ops) = | `UninstallPackages pkgs -> message (f_"Uninstalling packages: %s") (String.concat " " pkgs); - let cmd = guest_uninstall_command pkgs in + let cmd = guest_pkgs_command (Guest_packages.uninstall_command pkgs) in do_run ~display:cmd cmd | `Update -> message (f_"Updating packages"); - let cmd = guest_update_command () in + let cmd = guest_pkgs_command Guest_packages.update_command in do_run ~display:cmd ~warn_failed_no_network:true cmd | `Upload (path, dest) -> @@ -415,7 +381,7 @@ let run (g : G.guestfs) root (ops : ops) = warning (f_"passwords could not be set for this type of guest") ); - if ops.flags.selinux_relabel then ( + if not ops.flags.no_selinux_relabel then ( message (f_"SELinux relabelling"); SELinux_relabel.relabel g ); diff --git a/customize/hostname.ml b/customize/hostname.ml index df64a2d..50a287d 100644 --- a/customize/hostname.ml +++ b/customize/hostname.ml @@ -1,5 +1,5 @@ (* virt-sysprep - * Copyright (C) 2012-2020 Red Hat Inc. + * Copyright (C) 2012-2023 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 @@ -36,7 +36,8 @@ let rec set_hostname (g : Guestfs.guestfs) root hostname = update_etc_machine_info g hostname; true - | "linux", ("rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based"), v + | "linux", ("rhel"|"centos"|"scientificlinux"|"oraclelinux"|"rocky"| + "redhat-based"), v when v >= 7 -> update_etc_hostname g hostname; update_etc_machine_info g hostname; @@ -48,7 +49,8 @@ let rec set_hostname (g : Guestfs.guestfs) root hostname = replace_host_in_etc_hosts g old_hostname hostname; true - | "linux", ("fedora"|"rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based"), _ -> + | "linux", ("fedora"|"rhel"|"centos"|"scientificlinux"|"oraclelinux"| + "redhat-based"), _ -> replace_line_in_file g "/etc/sysconfig/network" "HOSTNAME" hostname; true diff --git a/customize/hostname.mli b/customize/hostname.mli index a22b86d..393f231 100644 --- a/customize/hostname.mli +++ b/customize/hostname.mli @@ -1,5 +1,5 @@ (* virt-sysprep - * Copyright (C) 2012-2020 Red Hat Inc. + * Copyright (C) 2012-2023 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 diff --git a/customize/password.ml b/customize/password.ml index 608bf95..c0077fc 100644 --- a/customize/password.ml +++ b/customize/password.ml @@ -1,5 +1,5 @@ (* virt-sysprep - * Copyright (C) 2012-2021 Red Hat Inc. + * Copyright (C) 2012-2023 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 @@ -48,7 +48,8 @@ let password_crypto_of_string = function | "sha512" -> `SHA512 | "yescrypt" -> `YESCRYPT | arg -> - error (f_"password-crypto: unknown algorithm %s, use \"md5\", \"sha256\", \"sha512\" or \"yescrypt\"") 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) @@ -74,7 +75,8 @@ and parse_selector_list orig_arg = function (* Permissible characters in a salt. *) let chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789./" -let rec set_linux_passwords ?password_crypto (g : Guestfs.guestfs) root passwords = +let rec set_linux_passwords ?password_crypto (g : Guestfs.guestfs) + root passwords = let crypto = match password_crypto with | None -> default_crypto g root @@ -160,9 +162,11 @@ 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 -> + | ("rhel"|"centos"|"scientificlinux"|"oraclelinux"|"rocky"| + "redhat-based"), v when v >= 9 -> `YESCRYPT - | ("rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based"), v when v >= 6 -> + | ("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) *) @@ -189,7 +193,9 @@ and default_crypto g root = | _, _ -> let minor = g#inspect_get_minor_version root in - warning (f_"password: using insecure md5 password encryption for guest of type %s version %d.%d. -If this is incorrect, use --password-crypto option and file a bug.") + warning (f_"password: using insecure md5 password encryption for \ + guest of type %s version %d.%d.\n\ + If this is incorrect, use --password-crypto option \ + and file a bug.") distro major minor; `MD5 diff --git a/customize/password.mli b/customize/password.mli index 4130901..49a2221 100644 --- a/customize/password.mli +++ b/customize/password.mli @@ -1,5 +1,5 @@ (* virt-sysprep - * Copyright (C) 2012-2021 Red Hat Inc. + * Copyright (C) 2012-2023 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 diff --git a/customize/perl_edit.ml b/customize/perl_edit.ml index 415cae9..38f88d5 100644 --- a/customize/perl_edit.ml +++ b/customize/perl_edit.ml @@ -19,7 +19,8 @@ open Std_utils open Tools_utils -external c_edit_file : verbose:bool -> Guestfs.t -> int64 -> string -> string -> unit +external c_edit_file : verbose:bool -> Guestfs.t -> int64 -> string -> string + -> unit = "virt_customize_edit_file_perl" let edit_file g file expr = (* Note we pass original 'g' even though it is not used by the diff --git a/customize/random_seed.ml b/customize/random_seed.ml index f32d319..f3c1ab6 100644 --- a/customize/random_seed.ml +++ b/customize/random_seed.ml @@ -1,5 +1,5 @@ (* virt-sysprep - * Copyright (C) 2012-2020 Red Hat Inc. + * Copyright (C) 2012-2023 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 @@ -47,7 +47,8 @@ let rec set_random_seed (g : Guestfs.guestfs) root = let distro = g#inspect_get_distro root in let file = match typ, distro with - | "linux", ("fedora"|"rhel"|"centos"|"scientificlinux"|"oraclelinux"|"redhat-based") -> + | "linux", ("fedora"|"rhel"|"centos"|"scientificlinux"|"oraclelinux"| + "rocky"|"redhat-based") -> Some "/var/lib/random-seed" | "linux", ("debian"|"ubuntu"|"kalilinux") -> Some "/var/lib/urandom/random-seed" diff --git a/customize/random_seed.mli b/customize/random_seed.mli index fc552b6..650a170 100644 --- a/customize/random_seed.mli +++ b/customize/random_seed.mli @@ -1,5 +1,5 @@ (* virt-sysprep - * Copyright (C) 2012-2020 Red Hat Inc. + * Copyright (C) 2012-2023 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 diff --git a/customize/test-settings.sh b/customize/test-settings.sh index ed4c90f..e8b492d 100755 --- a/customize/test-settings.sh +++ b/customize/test-settings.sh @@ -61,9 +61,6 @@ case "$guestname" in extra[${#extra[*]}]='/etc/inittab: s,^#([1-9].*respawn.*/sbin/getty.*),$1,' ;; - fedora*|rhel*|centos*) - extra[${#extra[*]}]='--selinux-relabel' - ;; *) ;; esac diff --git a/customize/timezone.ml b/customize/timezone.ml index 2ac7a10..1de566e 100644 --- a/customize/timezone.ml +++ b/customize/timezone.ml @@ -17,6 +17,7 @@ *) open Tools_utils +open Common_gettext.Gettext open Printf @@ -31,7 +32,8 @@ let set_timezone (g : Guestfs.guestfs) root timezone = | "linux" -> let target = sprintf "/usr/share/zoneinfo/%s" timezone in if not (g#exists target) then - error "timezone '%s' does not exist, use a location like 'Europe/London'" timezone; + error (f_"timezone '%s' does not exist, use a location like \ + 'Europe/London'") timezone; g#ln_sf target "/etc/localtime"; true diff --git a/customize/virt-customize.pod b/customize/virt-customize.pod index 6a91f69..1b386e3 100644 --- a/customize/virt-customize.pod +++ b/customize/virt-customize.pod @@ -311,4 +311,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2011-2020 Red Hat Inc. +Copyright (C) 2011-2023 Red Hat Inc. diff --git a/df/Makefile.am b/df/Makefile.am index f312c7f..9eb4a31 100644 --- a/df/Makefile.am +++ b/df/Makefile.am @@ -1,5 +1,5 @@ # libguestfs virt-df -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 diff --git a/df/Makefile.in b/df/Makefile.in index e0e18d9..f2c7a1d 100644 --- a/df/Makefile.in +++ b/df/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs virt-df -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -494,7 +494,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -523,6 +522,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -593,6 +594,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/df/df.c b/df/df.c index 66b1d83..bdbf739 100644 --- a/df/df.c +++ b/df/df.c @@ -1,5 +1,5 @@ /* virt-df - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 diff --git a/df/main.c b/df/main.c index 479d27f..4f1ea3f 100644 --- a/df/main.c +++ b/df/main.c @@ -1,5 +1,5 @@ /* virt-df - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 diff --git a/df/output.c b/df/output.c index 7c999ec..eed9d13 100644 --- a/df/output.c +++ b/df/output.c @@ -1,5 +1,5 @@ /* virt-df - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 diff --git a/df/test-virt-df.sh b/df/test-virt-df.sh index 166a13c..fb5f5de 100755 --- a/df/test-virt-df.sh +++ b/df/test-virt-df.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/df/virt-df.h b/df/virt-df.h index 0b414c1..d531002 100644 --- a/df/virt-df.h +++ b/df/virt-df.h @@ -1,5 +1,5 @@ /* virt-df - * Copyright (C) 2010-2020 Red Hat Inc. + * Copyright (C) 2010-2023 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 diff --git a/df/virt-df.pod b/df/virt-df.pod index 8135e44..8bd5a09 100644 --- a/df/virt-df.pod +++ b/df/virt-df.pod @@ -260,6 +260,7 @@ error. L, L, L, +L, L, L. @@ -269,4 +270,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/dib/Makefile.in b/dib/Makefile.in index 786d3b3..7985a71 100644 --- a/dib/Makefile.in +++ b/dib/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -489,7 +489,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -518,6 +517,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -588,6 +589,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/dib/dib.ml b/dib/dib.ml index f5ce604..a4ba360 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 - On_exit.rmdir tmpdir; + On_exit.rm_rf tmpdir; let auxtmpdir = tmpdir // "in_target.aux" in do_mkdir auxtmpdir; let hookstmpdir = auxtmpdir // "hooks" in diff --git a/dib/output_format.ml b/dib/output_format.ml index 0e3d67e..247f335 100644 --- a/dib/output_format.ml +++ b/dib/output_format.ml @@ -1,5 +1,5 @@ (* virt-dib - * Copyright (C) 2012-2020 Red Hat Inc. + * Copyright (C) 2012-2023 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 diff --git a/dib/output_format.mli b/dib/output_format.mli index b7e526b..d545891 100644 --- a/dib/output_format.mli +++ b/dib/output_format.mli @@ -1,5 +1,5 @@ (* virt-dib - * Copyright (C) 2012-2020 Red Hat Inc. + * Copyright (C) 2012-2023 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 diff --git a/dib/output_format_docker.ml b/dib/output_format_docker.ml index 92787a2..7f254ba 100644 --- a/dib/output_format_docker.ml +++ b/dib/output_format_docker.ml @@ -1,5 +1,5 @@ (* virt-dib - * Copyright (C) 2016-2020 Red Hat Inc. + * Copyright (C) 2016-2023 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 diff --git a/dib/output_format_qcow2.ml b/dib/output_format_qcow2.ml index 5b669fe..d126056 100644 --- a/dib/output_format_qcow2.ml +++ b/dib/output_format_qcow2.ml @@ -1,5 +1,5 @@ (* virt-dib - * Copyright (C) 2015-2020 Red Hat Inc. + * Copyright (C) 2015-2023 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 diff --git a/dib/output_format_raw.ml b/dib/output_format_raw.ml index 047731b..a366798 100644 --- a/dib/output_format_raw.ml +++ b/dib/output_format_raw.ml @@ -1,5 +1,5 @@ (* virt-dib - * Copyright (C) 2015-2020 Red Hat Inc. + * Copyright (C) 2015-2023 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 diff --git a/dib/output_format_tar.ml b/dib/output_format_tar.ml index c1a7672..6f749f8 100644 --- a/dib/output_format_tar.ml +++ b/dib/output_format_tar.ml @@ -1,5 +1,5 @@ (* virt-dib - * Copyright (C) 2015-2020 Red Hat Inc. + * Copyright (C) 2015-2023 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 diff --git a/dib/output_format_vhd.ml b/dib/output_format_vhd.ml index afca196..1d56947 100644 --- a/dib/output_format_vhd.ml +++ b/dib/output_format_vhd.ml @@ -1,5 +1,5 @@ (* virt-dib - * Copyright (C) 2015-2020 Red Hat Inc. + * Copyright (C) 2015-2023 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 diff --git a/diff/Makefile.in b/diff/Makefile.in index f595947..7397baf 100644 --- a/diff/Makefile.in +++ b/diff/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -488,7 +488,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -517,6 +516,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -587,6 +588,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/diff/diff.c b/diff/diff.c index 6aae88e..fb66a2b 100644 --- a/diff/diff.c +++ b/diff/diff.c @@ -106,7 +106,7 @@ usage (int status) getprogname ()); else { printf (_("%s: list differences between virtual machines\n" - "Copyright (C) 2010-2020 Red Hat Inc.\n" + "Copyright (C) 2010-2023 Red Hat Inc.\n" "Usage:\n" " %s [--options] -d domain1 -D domain2\n" " %s [--options] -a disk1.img -A disk2.img [-a|-A ...]\n" @@ -209,6 +209,7 @@ main (int argc, char *argv[]) int option_index; struct tree *tree1, *tree2; struct key_store *ks = NULL; + bool network; g = guestfs_create (); if (g == NULL) @@ -378,6 +379,10 @@ main (int argc, char *argv[]) /* Mount up first guest. */ add_drives (drvs); + network = key_store_requires_network (ks); + if (guestfs_set_network (g, network) == -1) + exit (EXIT_FAILURE); + if (guestfs_launch (g) == -1) exit (EXIT_FAILURE); @@ -389,6 +394,9 @@ main (int argc, char *argv[]) /* Mount up second guest. */ add_drives_handle (g2, drvs2, 0); + if (guestfs_set_network (g2, network) == -1) + exit (EXIT_FAILURE); + if (guestfs_launch (g2) == -1) exit (EXIT_FAILURE); diff --git a/diff/virt-diff.pod b/diff/virt-diff.pod index bcec24c..6bbcfb2 100644 --- a/diff/virt-diff.pod +++ b/diff/virt-diff.pod @@ -262,4 +262,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/docs/Makefile.am b/docs/Makefile.am index 5f489d1..8148f0e 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1,5 +1,5 @@ # guestfs-tools documentation -# Copyright (C) 2010-2022 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -18,12 +18,15 @@ include $(top_srcdir)/subdir-rules.mk EXTRA_DIST = \ - guestfs-tools-release-notes-1.48.pod + guestfs-tools-release-notes-1.48.pod \ + guestfs-tools-release-notes-1.50.pod man_MANS = \ - guestfs-tools-release-notes-1.48.1 + guestfs-tools-release-notes-1.48.1 \ + guestfs-tools-release-notes-1.50.1 noinst_DATA = \ - $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html + $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html \ + $(top_builddir)/website/guestfs-tools-release-notes-1.50.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 @@ -35,3 +38,14 @@ stamp-guestfs-tools-release-notes-1.48.pod: guestfs-tools-release-notes-1.48.pod --license GPLv2+ \ $< touch $@ + +guestfs-tools-release-notes-1.50.1 guestfs-tools-release-notes-1.50.txt $(top_builddir)/website/guestfs-tools-release-notes-1.50.1.html: stamp-guestfs-tools-release-notes-1.50.pod + +stamp-guestfs-tools-release-notes-1.50.pod: guestfs-tools-release-notes-1.50.pod + $(PODWRAPPER) \ + --section 1 \ + --man guestfs-tools-release-notes-1.50.1 \ + --html $(top_builddir)/website/guestfs-tools-release-notes-1.50.1.html \ + --license GPLv2+ \ + $< + touch $@ diff --git a/docs/Makefile.in b/docs/Makefile.in index 0e218a2..d76d559 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # guestfs-tools documentation -# Copyright (C) 2010-2022 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -251,7 +251,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -280,6 +279,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -350,6 +351,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -491,13 +493,16 @@ 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 + guestfs-tools-release-notes-1.48.pod \ + guestfs-tools-release-notes-1.50.pod man_MANS = \ - guestfs-tools-release-notes-1.48.1 + guestfs-tools-release-notes-1.48.1 \ + guestfs-tools-release-notes-1.50.1 noinst_DATA = \ - $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html + $(top_builddir)/website/guestfs-tools-release-notes-1.48.1.html \ + $(top_builddir)/website/guestfs-tools-release-notes-1.50.1.html all: all-am @@ -808,6 +813,17 @@ stamp-guestfs-tools-release-notes-1.48.pod: guestfs-tools-release-notes-1.48.pod $< touch $@ +guestfs-tools-release-notes-1.50.1 guestfs-tools-release-notes-1.50.txt $(top_builddir)/website/guestfs-tools-release-notes-1.50.1.html: stamp-guestfs-tools-release-notes-1.50.pod + +stamp-guestfs-tools-release-notes-1.50.pod: guestfs-tools-release-notes-1.50.pod + $(PODWRAPPER) \ + --section 1 \ + --man guestfs-tools-release-notes-1.50.1 \ + --html $(top_builddir)/website/guestfs-tools-release-notes-1.50.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 index 44f7e4f..ab2e173 100644 --- a/docs/guestfs-tools-release-notes-1.48.pod +++ b/docs/guestfs-tools-release-notes-1.48.pod @@ -127,4 +127,4 @@ git shortlog -s v1.46.0.. =head1 COPYRIGHT -Copyright (C) 2009-2022 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/docs/guestfs-tools-release-notes-1.50.pod b/docs/guestfs-tools-release-notes-1.50.pod new file mode 100644 index 0000000..26b9dbd --- /dev/null +++ b/docs/guestfs-tools-release-notes-1.50.pod @@ -0,0 +1,182 @@ +=head1 NAME + +guestfs-tools-release-notes - guestfs tools release Notes + +=head1 RELEASE NOTES FOR GUESTFS TOOLS 1.50 + +These are the release notes for guestfs tools stable release 1.50. +This describes the major changes since 1.48. + +Guestfs tools 1.50.0 was released on B<7 February 2023>. + +=head2 Security + +=over 4 + +=item CVE-2022-2211 + +L + +A buffer overflow was found in the I<--key> option of several guestfs +tools. For more information on this low severity bug see the bug +report above (Laszlo Ersek). + +=back + +=head2 New virt-drivers tool + +This new tool can examine a disk image to determine: + +=over 4 + +=item * + +Whether it uses BIOS or UEFI for booting + +=item * + +What bootloader it uses (Linux only) + +=item * + +What kernels may be chosen at boot time (Linux only) + +=item * + +What device drivers (kernel modules) are installed + +=back + +This is useful for determining how (or if) a guest can boot on a +virtualization hypervisor. + +=head2 virt-customize + +I<--selinux-relabel> is now the default for SELinux guests. You no +longer need to specify this flag. In the rare case where you don't +want to relabel a guest after customizing it, you can use +I<--no-selinux-relabel>. Note this is not needed for non-SELinux +guests, it will do the right thing automatically (Laszlo Ersek). + +New I<--inject-qemu-ga> and I<--inject-virtio-win> operations which +respectively inject QEMU Guest Agent and virtio-win drivers into +Windows guests. + +Rocky Linux guests are now supported (thanks Harry Benson). + +=head2 virt-inspector + +Virt-inspector now outputs the new Ebuild_idE element +containing the guest build ID, if using libguestfs E 1.50. + +=head2 virt-sysprep + +New C operation for removing LVM2's +F file. This avoids certain problems when cloning a +VM (Laszlo Ersek). + +Virt-sysprep supports guests using LUKS logical volumes on top of LVM +(Laszlo Ersek). + +=head2 Common changes + +All the tools supporting the I<--key> option can now use Clevis/Tang +to decrypt full disk encryption using this network-based scheme +(Laszlo Ersek). + +=head2 Build changes + +B that libguestfs now requires minimum OCaml 4.04. It will not +compile on RHEL 6. + +B that libosinfo is a new required dependency. + +OCaml 4.14 is now supported. + +C<./configure --disable-ocaml> and C<./configure --disable-perl> now +disable the OCaml- and Perl-based tools respectively (thanks Simon +Walter). + +Experimental support for compiling on macOS. + +When running C, Valgrind logs are no longer +written to separate files under F. Instead the output is +written to the normal F.log> file. + +=begin comment + +=head2 Internals + +=end comment + +=head2 Bugs fixed + +=begin comment + +https_proxy= ./bugs-in-changelog.sh v1.48.0.. + +=end comment + +=over 4 + +=item L + +RFE: Support Rocky Linux in virt-customize + +=item L + +virt-sysprep: make an effort to support LUKS on LV + +=item L + +Removal of "--selinux-relabel" option breaks existing scripts + +=item L + +Having to use "--selinux-relabel" is not intuitive given Red Hat products default to selinux enabled. + +=item L + +[RFE] Request to add lvm system.devices cleanup operation to virt-sysprep + +=item L + +[RHEL 9.0][Nutanix] lvm partition "home" will lost with SCSI disk either in the new cloned VM or restored from a snapshot + +=item L + +Install the qemu-guest-agent package during the conversion process + +=item L + +[RFE] Add support for LUKS encrypted disks with Clevis & Tang + +=item L + +RFE: customize --selinux-relabel should be the default, with --no-selinux-relabel used to opt out + +=back + +=head1 SEE ALSO + +L + +=head1 AUTHORS + +=begin comment + +git shortlog -s v1.48.0.. + +=end comment + +=over 4 + +=item Laszlo Ersek + +=item Richard W.M. Jones + +=back + +=head1 COPYRIGHT + +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/drivers/Makefile.am b/drivers/Makefile.am new file mode 100644 index 0000000..d27fc2e --- /dev/null +++ b/drivers/Makefile.am @@ -0,0 +1,152 @@ +# virt-drivers tool +# Copyright (C) 2009-2023 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 = \ + $(SOURCES_MLI) $(SOURCES_ML) $(SOURCES_C) \ + expected-fedora.xml \ + expected-windows.xml \ + test-virt-drivers-docs.sh \ + test-virt-drivers-linux.sh \ + test-virt-drivers-windows.sh \ + virt-drivers.pod + +SOURCES_MLI = \ + drivers.mli + +SOURCES_ML = \ + drivers.ml + +SOURCES_C = \ + dummy.c + +man_MANS = +noinst_DATA = +bin_PROGRAMS = + +if HAVE_OCAML + +bin_PROGRAMS += virt-drivers + +virt_drivers_SOURCES = $(SOURCES_C) +virt_drivers_CPPFLAGS = \ + -I. \ + -I$(top_builddir) \ + -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \ + -I$(shell $(OCAMLC) -where) \ + -I$(top_srcdir)/gnulib/lib \ + -I$(top_srcdir)/common/utils \ + -I$(top_srcdir)/lib +virt_drivers_CFLAGS = \ + -pthread \ + $(WARN_CFLAGS) $(WERROR_CFLAGS) \ + $(LIBXML2_CFLAGS) + +BOBJECTS = $(SOURCES_ML:.ml=.cmo) +XOBJECTS = $(BOBJECTS:.cmo=.cmx) + +OCAMLPACKAGES = \ + -package str,unix,guestfs \ + -I $(top_builddir)/common/utils/.libs \ + -I $(top_builddir)/gnulib/lib/.libs \ + -I $(top_builddir)/ocaml \ + -I $(top_builddir)/common/mlstdutils \ + -I $(top_builddir)/common/mlutils \ + -I $(top_builddir)/common/mlgettext \ + -I $(top_builddir)/common/mlpcre \ + -I $(top_builddir)/common/mltools \ + -I $(top_builddir)/common/mldrivers +if HAVE_OCAML_PKG_GETTEXT +OCAMLPACKAGES += -package gettext-stub +endif + +OCAMLCLIBS = \ + -pthread -lpthread \ + -lutils \ + $(LIBXML2_LIBS) \ + $(LIBGUESTFS_LIBS) \ + $(LIBINTL) \ + -lgnu + +OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' + +if !HAVE_OCAMLOPT +OBJECTS = $(BOBJECTS) +else +OBJECTS = $(XOBJECTS) +endif + +OCAMLLINKFLAGS = \ + mlstdutils.$(MLARCHIVE) \ + mlguestfs.$(MLARCHIVE) \ + mlgettext.$(MLARCHIVE) \ + mlpcre.$(MLARCHIVE) \ + mlcutils.$(MLARCHIVE) \ + mltools.$(MLARCHIVE) \ + mldrivers.$(MLARCHIVE) \ + $(LINK_CUSTOM_OCAMLC_ONLY) + +virt_drivers_DEPENDENCIES = \ + $(OBJECTS) \ + ../common/mlstdutils/mlstdutils.$(MLARCHIVE) \ + ../common/mlutils/mlcutils.$(MLARCHIVE) \ + ../common/mlgettext/mlgettext.$(MLARCHIVE) \ + ../common/mlpcre/mlpcre.$(MLARCHIVE) \ + ../common/mltools/mltools.$(MLARCHIVE) \ + ../common/mldrivers/mldrivers.$(MLARCHIVE) \ + $(top_builddir)/ocaml-link.sh +virt_drivers_LINK = \ + $(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \ + $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \ + $(OBJECTS) -o $@ + +# Tests. + +TESTS_ENVIRONMENT = $(top_builddir)/run --test + +TESTS = \ + test-virt-drivers-docs.sh \ + test-virt-drivers-linux.sh \ + test-virt-drivers-windows.sh + +check-valgrind: + $(MAKE) VG="@VG@" check + +# Manual pages and HTML files for the website. + +man_MANS += virt-drivers.1 +noinst_DATA += $(top_builddir)/website/virt-drivers.1.html + +virt-drivers.1 $(top_builddir)/website/virt-drivers.1.html: stamp-virt-drivers.pod + +stamp-virt-drivers.pod: virt-drivers.pod + $(PODWRAPPER) \ + --man virt-drivers.1 \ + --html $(top_builddir)/website/virt-drivers.1.html \ + --path $(top_srcdir)/common/options \ + --license GPLv2+ \ + --warning safe \ + $< + touch $@ + +# OCaml dependencies. +.depend: $(srcdir)/*.mli $(srcdir)/*.ml + $(top_builddir)/ocaml-dep.sh $^ +-include .depend + +endif diff --git a/drivers/Makefile.in b/drivers/Makefile.in new file mode 100644 index 0000000..a4b1463 --- /dev/null +++ b/drivers/Makefile.in @@ -0,0 +1,1483 @@ +# 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@ + +# virt-drivers tool +# Copyright (C) 2009-2023 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-2023 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@ +bin_PROGRAMS = $(am__EXEEXT_1) +@HAVE_OCAML_TRUE@am__append_1 = virt-drivers +@HAVE_OCAML_PKG_GETTEXT_TRUE@@HAVE_OCAML_TRUE@am__append_2 = -package gettext-stub + +# Manual pages and HTML files for the website. +@HAVE_OCAML_TRUE@am__append_3 = virt-drivers.1 +@HAVE_OCAML_TRUE@am__append_4 = $(top_builddir)/website/virt-drivers.1.html +subdir = drivers +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 = +@HAVE_OCAML_TRUE@am__EXEEXT_1 = virt-drivers$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" +PROGRAMS = $(bin_PROGRAMS) +am__virt_drivers_SOURCES_DIST = dummy.c +am__objects_1 = virt_drivers-dummy.$(OBJEXT) +@HAVE_OCAML_TRUE@am_virt_drivers_OBJECTS = $(am__objects_1) +virt_drivers_OBJECTS = $(am_virt_drivers_OBJECTS) +virt_drivers_LDADD = $(LDADD) +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 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/virt_drivers-dummy.Po +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(virt_drivers_SOURCES) +DIST_SOURCES = $(am__virt_drivers_SOURCES_DIST) +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 +NROFF = nroff +MANS = $(man_MANS) +DATA = $(noinst_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +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 +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) +am__DIST_COMMON = $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/test-driver \ + $(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@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ +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@ +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@ +REALPATH = @REALPATH@ +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 = \ + $(SOURCES_MLI) $(SOURCES_ML) $(SOURCES_C) \ + expected-fedora.xml \ + expected-windows.xml \ + test-virt-drivers-docs.sh \ + test-virt-drivers-linux.sh \ + test-virt-drivers-windows.sh \ + virt-drivers.pod + +SOURCES_MLI = \ + drivers.mli + +SOURCES_ML = \ + drivers.ml + +SOURCES_C = \ + dummy.c + +man_MANS = $(am__append_3) +noinst_DATA = $(am__append_4) +@HAVE_OCAML_TRUE@virt_drivers_SOURCES = $(SOURCES_C) +@HAVE_OCAML_TRUE@virt_drivers_CPPFLAGS = \ +@HAVE_OCAML_TRUE@ -I. \ +@HAVE_OCAML_TRUE@ -I$(top_builddir) \ +@HAVE_OCAML_TRUE@ -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \ +@HAVE_OCAML_TRUE@ -I$(shell $(OCAMLC) -where) \ +@HAVE_OCAML_TRUE@ -I$(top_srcdir)/gnulib/lib \ +@HAVE_OCAML_TRUE@ -I$(top_srcdir)/common/utils \ +@HAVE_OCAML_TRUE@ -I$(top_srcdir)/lib + +@HAVE_OCAML_TRUE@virt_drivers_CFLAGS = \ +@HAVE_OCAML_TRUE@ -pthread \ +@HAVE_OCAML_TRUE@ $(WARN_CFLAGS) $(WERROR_CFLAGS) \ +@HAVE_OCAML_TRUE@ $(LIBXML2_CFLAGS) + +@HAVE_OCAML_TRUE@BOBJECTS = $(SOURCES_ML:.ml=.cmo) +@HAVE_OCAML_TRUE@XOBJECTS = $(BOBJECTS:.cmo=.cmx) +@HAVE_OCAML_TRUE@OCAMLPACKAGES = -package str,unix,guestfs -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/utils/.libs -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/gnulib/lib/.libs -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/ocaml -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/mlstdutils -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/mlutils -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/mlgettext -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/mlpcre -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/mltools -I \ +@HAVE_OCAML_TRUE@ $(top_builddir)/common/mldrivers \ +@HAVE_OCAML_TRUE@ $(am__append_2) +@HAVE_OCAML_TRUE@OCAMLCLIBS = \ +@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 + +@HAVE_OCAML_TRUE@OCAMLFLAGS = $(OCAML_FLAGS) $(OCAML_WARN_ERROR) -ccopt '$(CFLAGS)' +@HAVE_OCAMLOPT_FALSE@@HAVE_OCAML_TRUE@OBJECTS = $(BOBJECTS) +@HAVE_OCAMLOPT_TRUE@@HAVE_OCAML_TRUE@OBJECTS = $(XOBJECTS) +@HAVE_OCAML_TRUE@OCAMLLINKFLAGS = \ +@HAVE_OCAML_TRUE@ mlstdutils.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ mlguestfs.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ mlgettext.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ mlpcre.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ mlcutils.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ mltools.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ mldrivers.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ $(LINK_CUSTOM_OCAMLC_ONLY) + +@HAVE_OCAML_TRUE@virt_drivers_DEPENDENCIES = \ +@HAVE_OCAML_TRUE@ $(OBJECTS) \ +@HAVE_OCAML_TRUE@ ../common/mlstdutils/mlstdutils.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ ../common/mlutils/mlcutils.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ ../common/mlgettext/mlgettext.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ ../common/mlpcre/mlpcre.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ ../common/mltools/mltools.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ ../common/mldrivers/mldrivers.$(MLARCHIVE) \ +@HAVE_OCAML_TRUE@ $(top_builddir)/ocaml-link.sh + +@HAVE_OCAML_TRUE@virt_drivers_LINK = \ +@HAVE_OCAML_TRUE@ $(top_builddir)/ocaml-link.sh -cclib '$(OCAMLCLIBS)' -- \ +@HAVE_OCAML_TRUE@ $(OCAMLFIND) $(BEST) $(OCAMLFLAGS) $(OCAMLPACKAGES) $(OCAMLLINKFLAGS) \ +@HAVE_OCAML_TRUE@ $(OBJECTS) -o $@ + + +# Tests. +@HAVE_OCAML_TRUE@TESTS_ENVIRONMENT = $(top_builddir)/run --test +@HAVE_OCAML_TRUE@TESTS = \ +@HAVE_OCAML_TRUE@ test-virt-drivers-docs.sh \ +@HAVE_OCAML_TRUE@ test-virt-drivers-linux.sh \ +@HAVE_OCAML_TRUE@ test-virt-drivers-windows.sh + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly .po .gmo .c .lo .log .o .obj .test .test$(EXEEXT) .trs +$(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 drivers/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign drivers/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): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +virt-drivers$(EXEEXT): $(virt_drivers_OBJECTS) $(virt_drivers_DEPENDENCIES) $(EXTRA_virt_drivers_DEPENDENCIES) + @rm -f virt-drivers$(EXEEXT) + $(AM_V_GEN)$(virt_drivers_LINK) $(virt_drivers_OBJECTS) $(virt_drivers_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_drivers-dummy.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +virt_drivers-dummy.o: dummy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(virt_drivers_CPPFLAGS) $(CPPFLAGS) $(virt_drivers_CFLAGS) $(CFLAGS) -MT virt_drivers-dummy.o -MD -MP -MF $(DEPDIR)/virt_drivers-dummy.Tpo -c -o virt_drivers-dummy.o `test -f 'dummy.c' || echo '$(srcdir)/'`dummy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_drivers-dummy.Tpo $(DEPDIR)/virt_drivers-dummy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy.c' object='virt_drivers-dummy.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(virt_drivers_CPPFLAGS) $(CPPFLAGS) $(virt_drivers_CFLAGS) $(CFLAGS) -c -o virt_drivers-dummy.o `test -f 'dummy.c' || echo '$(srcdir)/'`dummy.c + +virt_drivers-dummy.obj: dummy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(virt_drivers_CPPFLAGS) $(CPPFLAGS) $(virt_drivers_CFLAGS) $(CFLAGS) -MT virt_drivers-dummy.obj -MD -MP -MF $(DEPDIR)/virt_drivers-dummy.Tpo -c -o virt_drivers-dummy.obj `if test -f 'dummy.c'; then $(CYGPATH_W) 'dummy.c'; else $(CYGPATH_W) '$(srcdir)/dummy.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_drivers-dummy.Tpo $(DEPDIR)/virt_drivers-dummy.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dummy.c' object='virt_drivers-dummy.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(virt_drivers_CPPFLAGS) $(CPPFLAGS) $(virt_drivers_CFLAGS) $(CFLAGS) -c -o virt_drivers-dummy.obj `if test -f 'dummy.c'; then $(CYGPATH_W) 'dummy.c'; else $(CYGPATH_W) '$(srcdir)/dummy.c'; fi` + +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) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + elif test -n "$$redo_logs"; then \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test-virt-drivers-docs.sh.log: test-virt-drivers-docs.sh + @p='test-virt-drivers-docs.sh'; \ + b='test-virt-drivers-docs.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-drivers-linux.sh.log: test-virt-drivers-linux.sh + @p='test-virt-drivers-linux.sh'; \ + b='test-virt-drivers-linux.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-drivers-windows.sh.log: test-virt-drivers-windows.sh + @p='test-virt-drivers-windows.sh'; \ + b='test-virt-drivers-windows.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.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@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 + +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 + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(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: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + +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-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/virt_drivers-dummy.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +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-binPROGRAMS + +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 ./$(DEPDIR)/virt_drivers-dummy.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS uninstall-man + +uninstall-man: uninstall-man1 + +.MAKE: check-am install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-binPROGRAMS clean-generic clean-libtool \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS 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-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am uninstall-binPROGRAMS 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)" + +@HAVE_OCAML_TRUE@check-valgrind: +@HAVE_OCAML_TRUE@ $(MAKE) VG="@VG@" check + +@HAVE_OCAML_TRUE@virt-drivers.1 $(top_builddir)/website/virt-drivers.1.html: stamp-virt-drivers.pod + +@HAVE_OCAML_TRUE@stamp-virt-drivers.pod: virt-drivers.pod +@HAVE_OCAML_TRUE@ $(PODWRAPPER) \ +@HAVE_OCAML_TRUE@ --man virt-drivers.1 \ +@HAVE_OCAML_TRUE@ --html $(top_builddir)/website/virt-drivers.1.html \ +@HAVE_OCAML_TRUE@ --path $(top_srcdir)/common/options \ +@HAVE_OCAML_TRUE@ --license GPLv2+ \ +@HAVE_OCAML_TRUE@ --warning safe \ +@HAVE_OCAML_TRUE@ $< +@HAVE_OCAML_TRUE@ touch $@ + +# OCaml dependencies. +@HAVE_OCAML_TRUE@.depend: $(srcdir)/*.mli $(srcdir)/*.ml +@HAVE_OCAML_TRUE@ $(top_builddir)/ocaml-dep.sh $^ +@HAVE_OCAML_TRUE@-include .depend + +# 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/drivers/drivers.ml b/drivers/drivers.ml new file mode 100644 index 0000000..57cfb55 --- /dev/null +++ b/drivers/drivers.ml @@ -0,0 +1,303 @@ +(* virt-drivers + * Copyright (C) 2009-2023 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 Getopt.OptionName +open DOM + +open Printf + +let parse_cmdline () = + let blocksize = ref 0 in + let domain = ref None in + let file = ref None in + let libvirturi = ref "" in + let format = ref "auto" in + + let set_file arg = + if !file <> None then + error (f_"--add option can only be given once"); + let uri = + try URI.parse_uri arg + with URI.Parse_failed -> + error (f_"error parsing URI '%s'. \ + Look for error messages printed above.") arg in + file := Some uri + and set_domain dom = + if !domain <> None then + error (f_"--domain option can only be given once"); + domain := Some dom + in + + let argspec = [ + [ S 'a'; L"add" ], Getopt.String (s_"file", set_file), s_"Add disk image file"; + [ L"blocksize" ], Getopt.Set_int ("512|4096", blocksize), s_"Set disk sector size"; + [ S 'c'; L"connect" ], Getopt.Set_string (s_"uri", libvirturi), s_"Set libvirt URI"; + [ S 'd'; L"domain" ], Getopt.String (s_"domain", set_domain), s_"Set libvirt guest name"; + [ L"format" ], Getopt.Set_string (s_"format", format), s_"Format of input disk"; + ] in + let usage_msg = + sprintf (f_"\ +%s: detect bootloader, kernel and drivers inside guest + +A short summary of the options is given below. For detailed help please +read the man page virt-drivers(1). +") + prog in + let opthandle = create_standard_options argspec ~key_opts:true usage_msg in + Getopt.parse opthandle.getopt; + + (* Check -a and -d options. *) + let file = !file in + let domain = !domain in + let libvirturi = match !libvirturi with "" -> None | s -> Some s in + let add = + match file, domain with + | None, None -> + error (f_"you must give either -a or -d options. \ + Read virt-drivers(1) man page for further information.") + | Some _, Some _ -> + error (f_"you cannot give -a and -d options together. \ + Read virt-drivers(1) man page for further information.") + | None, Some dom -> + fun (g : Guestfs.guestfs) -> + let readonlydisk = "ignore" (* ignore CDs, data drives *) in + ignore (g#add_domain + ~readonly:true ~allowuuid:true ~readonlydisk + ?libvirturi dom) + | Some uri, None -> + fun g -> + let { URI.path; protocol; server; username; password } = uri in + let format = match !format with "auto" -> None | s -> Some s in + let blocksize = match !blocksize with 0 -> None | i -> Some i in + g#add_drive + ~readonly:true ?blocksize ?format ~protocol ?server ?username + ?secret:password path + in + + add, opthandle.ks + +let rec do_detection g roots = + let comment = Comment generated_by in + let firmware, firmware_xml = do_detect_firmware g in + let oses = List.map (fun root -> do_detect_os g root firmware) roots in + let doc : DOM.doc = + doc "operatingsystems" [] (comment :: firmware_xml @ oses) in + doc + +and do_detect_firmware g = + let firmware = Firmware.detect_firmware g in + let xml = + match firmware with + | Firmware.I_BIOS -> + [ e "firmware" ["type", "bios"] [] ] + | Firmware.I_UEFI esps -> + List.map (fun esp -> e "firmware" ["type", "uefi"] [ PCData esp ]) + esps in + firmware, xml + +and do_detect_os g root firmware = + let body = ref [] in + + (* Display some of the standard virt-inspector fields. *) + List.push_back body (e "root" [] [ PCData root ]); + let typ = g#inspect_get_type root in + if typ <> "unknown" then + List.push_back body (e "name" [] [ PCData typ ]); + + let adds fn field = + let v = fn root in + if v <> "unknown" then + List.push_back body (e field [] [ PCData v ]); + and addi fn field = + let v = fn root in + List.push_back body (e field [] [ PCData (string_of_int v) ]); + in + adds g#inspect_get_arch "arch"; + adds g#inspect_get_distro "distro"; + adds g#inspect_get_product_name "product_name"; + adds g#inspect_get_product_variant "product_variant"; + addi g#inspect_get_major_version "major_version"; + addi g#inspect_get_minor_version "minor_version"; + adds g#inspect_get_package_format "package_format"; + adds g#inspect_get_package_management "package_management"; + adds g#inspect_get_build_id "build_id"; + adds g#inspect_get_osinfo "osinfo"; + + (* Now mount up the disks in order to detect bootloader and kernels. *) + let mps = g#inspect_get_mountpoints root in + let cmp (a,_) (b,_) = compare (String.length a) (String.length b) in + let mps = List.sort cmp mps in + List.iter (fun (mp, dev) -> g#mount_ro dev mp) mps; + + (match typ with + | "linux" -> + (* XXX This shouldn't be necessary. Linux_* modules should do it. *) + g#aug_init "/" 1; + let bootloader = do_detect_linux_bootloader g root firmware in + List.push_back body bootloader + | "windows" -> + let drivers = do_detect_windows_drivers g root in + List.push_back body drivers + | _ -> () + ); + + g#umount_all (); + + e "operatingsystem" [] !body + +and do_detect_linux_bootloader g root firmware = + let bootloader = Linux_bootloaders.detect_bootloader g root firmware in + let bl_name = bootloader#name in + let bl_config = bootloader#get_config_file () in + let kernels = do_detect_linux_kernels g root bootloader in + e "bootloader" ["type", bl_name; "config", bl_config] kernels + +and do_detect_linux_kernels g root bootloader = + let apps = g#inspect_list_applications2 root in + let apps = Array.to_list apps in + let kernels = Linux_kernels.detect_kernels g root bootloader apps in + List.map kernel_info_to_xml kernels + +and kernel_info_to_xml { Linux_kernels.ki_name; ki_version; + ki_arch; ki_vmlinuz; ki_initrd; ki_modpath; + ki_modules; ki_supports_virtio_blk; + ki_supports_virtio_net; ki_supports_virtio_rng; + ki_supports_virtio_balloon; + ki_supports_isa_pvpanic; + ki_supports_virtio_socket; + ki_is_xen_pv_only_kernel; + ki_is_debug; ki_config_file } = + let body = ref [] in + List.push_back body (e "name" [] [ PCData ki_name ]); + List.push_back body (e "version" [] [ PCData ki_version ]); + List.push_back body (e "arch" [] [ PCData ki_arch ]); + List.push_back body (e "vmlinuz" [] [ PCData ki_vmlinuz ]); + List.may_push_back body + (Option.map (fun v -> e "initrd" [] [ PCData v ]) ki_initrd); + List.push_back body (e "modules_path" [] [ PCData ki_modpath ]); + List.push_back body (e "modules" [] + (List.map (fun m -> e "module" [] [ PCData m ]) + (List.sort compare ki_modules))); + if ki_supports_virtio_blk then + List.push_back body (e "supports_virtio_blk" [] []); + if ki_supports_virtio_net then + List.push_back body (e "supports_virtio_net" [] []); + if ki_supports_virtio_rng then + List.push_back body (e "supports_virtio_rng" [] []); + if ki_supports_virtio_balloon then + List.push_back body (e "supports_virtio_balloon" [] []); + if ki_supports_isa_pvpanic then + List.push_back body (e "supports_isa_pvpanic" [] []); + if ki_supports_virtio_socket then + List.push_back body (e "supports_virtio_socket" [] []); + if ki_is_xen_pv_only_kernel then + List.push_back body (e "is_xen_pv_only_kernel" [] []); + if ki_is_debug then + List.push_back body (e "debug_kernel" [] []); + List.may_push_back body + (Option.map (fun v -> e "config_file" [] [ PCData v ]) ki_config_file); + + e "kernel" [] !body + +and do_detect_windows_drivers g root = + let drivers = Windows_drivers.detect_drivers g root in + let drivers = List.map windows_driver_to_xml drivers in + e "drivers" [] drivers + +and windows_driver_to_xml { Windows_drivers.name; hwassoc } = + e "driver" [] ( + e "name" [] [PCData name] :: List.map windows_hardware_to_xml hwassoc + ) + +and windows_hardware_to_xml = function + | Windows_drivers.PCI { pci_class; pci_vendor; pci_device; + pci_subsys; pci_rev } -> + let attrs = ref [] in + List.may_push_back attrs + (Option.map (fun v -> ("class", sprintf "%06LX" v)) pci_class); + List.may_push_back attrs + (Option.map (fun v -> ("vendor", sprintf "%04LX" v)) pci_vendor); + List.may_push_back attrs + (Option.map (fun v -> ("device", sprintf "%04LX" v)) pci_device); + List.may_push_back attrs + (Option.map (fun v -> ("subsystem", sprintf "%08LX" v)) pci_subsys); + List.may_push_back attrs + (Option.map (fun v -> ("revision", sprintf "%02LX" v)) pci_rev); + e "pci" !attrs [] + + | HID { hid_vendor; hid_product; hid_rev; hid_col; hid_multi } -> + let attrs = ref [] in + List.may_push_back attrs + (Option.map (fun v -> ("vendor", sprintf "%04LX" v)) hid_vendor); + List.may_push_back attrs + (Option.map (fun v -> ("product", sprintf "%04LX" v)) hid_product); + List.may_push_back attrs + (Option.map (fun v -> ("revision", sprintf "%02LX" v)) hid_rev); + List.may_push_back attrs + (Option.map (fun v -> ("collection", sprintf "%02LX" v)) hid_col); + List.may_push_back attrs + (Option.map (fun v -> ("identifier", sprintf "%02LX" v)) hid_multi); + e "hid" !attrs [] + + | USB { usb_vendor; usb_product; usb_rev; usb_multi } -> + let attrs = ref [] in + List.may_push_back attrs + (Option.map (fun v -> ("vendor", sprintf "%04LX" v)) usb_vendor); + List.may_push_back attrs + (Option.map (fun v -> ("product", sprintf "%04LX" v)) usb_product); + List.may_push_back attrs + (Option.map (fun v -> ("revision", sprintf "%02LX" v)) usb_rev); + List.may_push_back attrs + (Option.map (fun v -> ("identifier", sprintf "%02LX" v)) usb_multi); + e "usb" !attrs [] + + | Other path -> + Comment (sprintf "unknown DeviceId: %s" (String.concat "\\" path)) + +(* Main program. *) +let main () = + let add, ks = parse_cmdline () in + + (* Connect to libguestfs. *) + let g = open_guestfs () in + add g; + g#set_network (key_store_requires_network ks); + g#launch (); + + (* Decrypt the disks. *) + inspect_decrypt g ks; + + let roots = g#inspect_os () in + let roots = Array.to_list roots in + + (* Can't call inspect_mount_root here (ie. normal processing of + * the -i option) because it can only handle a single root. + *) + + (* Do the detection. *) + let doc : DOM.doc = do_detection g roots in + DOM.doc_to_chan stdout doc; + + (* Shutdown. *) + g#shutdown (); + g#close () + +let () = run_main_and_handle_errors main diff --git a/drivers/drivers.mli b/drivers/drivers.mli new file mode 100644 index 0000000..4437e46 --- /dev/null +++ b/drivers/drivers.mli @@ -0,0 +1,19 @@ +(* virt-get-kernel + * Copyright (C) 2013-2023 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. + *) + +(* Nothing is exported. *) diff --git a/drivers/dummy.c b/drivers/dummy.c new file mode 100644 index 0000000..ebab619 --- /dev/null +++ b/drivers/dummy.c @@ -0,0 +1,2 @@ +/* Dummy source, to be used for OCaml-based tools with no C sources. */ +enum { foo = 1 }; diff --git a/drivers/expected-fedora.xml b/drivers/expected-fedora.xml new file mode 100644 index 0000000..72ea4bf --- /dev/null +++ b/drivers/expected-fedora.xml @@ -0,0 +1,31 @@ + + + + + + /dev/VG/Root + linux + x86_64 + fedora + Fedora release 14 (Phony) + 14 + 0 + rpm + yum + fedora14 + + + kernel + 5.19.0-0.rc1.14.fc37.x86_64 + x86_64 + /boot/vmlinuz-5.19.0-0.rc1.14.fc37.x86_64 + /boot/initramfs-5.19.0-0.rc1.14.fc37.x86_64.img + /lib/modules/5.19.0-0.rc1.14.fc37.x86_64 + + virtio_blk + + + + + + diff --git a/drivers/expected-windows.xml b/drivers/expected-windows.xml new file mode 100644 index 0000000..aa3a856 --- /dev/null +++ b/drivers/expected-windows.xml @@ -0,0 +1,26 @@ + + + + + + /dev/sda2 + windows + i386 + windows + Microsoft Windows 7 Phony Edition + Client + 6 + 1 + win7 + + + machine + + + + mshdc + + + + + diff --git a/drivers/test-virt-drivers-docs.sh b/drivers/test-virt-drivers-docs.sh new file mode 100755 index 0000000..cf23c17 --- /dev/null +++ b/drivers/test-virt-drivers-docs.sh @@ -0,0 +1,25 @@ +#!/bin/bash - +# libguestfs +# Copyright (C) 2016-2023 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. + +set -e + +$TEST_FUNCTIONS +skip_if_skipped + +$top_srcdir/podcheck.pl "$srcdir/virt-drivers.pod" virt-drivers \ + --path $top_srcdir/common/options diff --git a/drivers/test-virt-drivers-linux.sh b/drivers/test-virt-drivers-linux.sh new file mode 100755 index 0000000..df3f36c --- /dev/null +++ b/drivers/test-virt-drivers-linux.sh @@ -0,0 +1,30 @@ +#!/bin/bash - +# libguestfs +# Copyright (C) 2016-2023 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. + +set -e + +$TEST_FUNCTIONS +skip_if_skipped +skip_unless_phony_guest windows.img + +rm -f actual-windows.xml + +$VG virt-drivers --format=raw -a ../test-data/phony-guests/windows.img > actual-windows.xml +diff -ur -I "generated by" expected-windows.xml actual-windows.xml + +rm actual-windows.xml diff --git a/drivers/test-virt-drivers-windows.sh b/drivers/test-virt-drivers-windows.sh new file mode 100755 index 0000000..5404db1 --- /dev/null +++ b/drivers/test-virt-drivers-windows.sh @@ -0,0 +1,30 @@ +#!/bin/bash - +# libguestfs +# Copyright (C) 2016-2023 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. + +set -e + +$TEST_FUNCTIONS +skip_if_skipped +skip_unless_phony_guest fedora.img + +rm -f actual-fedora.xml + +$VG virt-drivers --format=raw -a ../test-data/phony-guests/fedora.img > actual-fedora.xml +diff -ur -I "generated by" expected-fedora.xml actual-fedora.xml + +rm actual-fedora.xml diff --git a/drivers/virt-drivers.pod b/drivers/virt-drivers.pod new file mode 100644 index 0000000..266dd68 --- /dev/null +++ b/drivers/virt-drivers.pod @@ -0,0 +1,250 @@ +=head1 NAME + +virt-drivers - Detect bootloader, kernel and drivers inside guest + +=head1 SYNOPSIS + + virt-drivers [--options] -d domname + + virt-drivers [--options] -a disk.img + +=head1 DESCRIPTION + +This tool can detect the bootloader, kernel and drivers inside some +guests from only the disk image. It can detect, for example, whether +a disk image needs BIOS or UEFI to boot, and whether it supports +virtio or requires slower emulated devices. + +=head2 Notes + +Normally you should distribute hypervisor metadata (eg. libvirt XML or +OVF) alongside disk images to tell the hypervisor how to boot them. +This tool is used when this metadata has not been provided. Work with +the supplier of the disk image to get them to provide proper metadata. + +=head1 XML FORMAT + +The output is an XML document. At the top level it lists the +operating systems found (the same as L): + + + + /dev/sda2 + linux + x86_64 + fedora + ... + + + /dev/sdb1 + ... + + + +=head2 EfirmwareE + +The EfirmwareE element lists the firmware which is required to +boot the guest. For UEFI it will additionally show the EFI system +partition ("ESP"). Guests may support multiple boot firmwares. For +example this guest is detected as using UEFI boot, and the UEFI ESP is +the first partition of the first disk: + + + /dev/sda1 + + ... + +=head2 EbootloaderE and EkernelE + +The EbootloaderE element shows the bootloader found in the +Linux guest. If known, this may contain information about what Linux +kernels are provided. For example: + + + + + /dev/sda2 + linux + ... + + + kernel + 6.1.0-0.rc6.46.fc38.x86_64 + /boot/vmlinuz-6.1.0-0.rc6.46.fc38.x86_64 + + ... + + + + ... + + + +Many more fields are usually available for Linux guests, including a +complete list of kernel modules and information about support for +virtio. For a complete example see: +L + +=head2 EdriversE + +The EdriversE element lists information about drivers found in +Windows guests: + + + + + /dev/sda2 + windows + ... + + + scsidev + + + + ... + + +The driver name (eg. C) corresponds to the Windows driver +F<.INF> file (eg. F). The list of PCI, USB etc devices +are the matching devices which would cause this driver to load at +boot. + +=head1 OPTIONS + +=over 4 + +=item B<--help> + +Display help. + +=item B<-a> file + +=item B<--add> file + +Add I which should be a disk image from a virtual machine. + +The format of the disk image is auto-detected. To override this and +force a particular format use the I<--format> option. + +=item B<-a> URI + +=item B<--add> URI + +Add a remote disk. The URI format is compatible with guestfish. +See L. + +=item B<--blocksize> B<512> + +=item B<--blocksize> B<4096> + +This parameter sets the sector size of the disk image added with I<-a> +option and is ignored for libvirt guest added with I<-d> option. See +also L. + +=item B<--colors> + +=item B<--colours> + +Use ANSI colour sequences to colourize messages. This is the default +when the output is a tty. If the output of the program is redirected +to a file, ANSI colour sequences are disabled unless you use this +option. + +=item B<-c> URI + +=item B<--connect> URI + +If using libvirt, connect to the given I. If omitted, then we +connect to the default libvirt hypervisor. + +If you specify guest block devices directly (I<-a>), then libvirt is +not used at all. + +=item B<-d> guest + +=item B<--domain> guest + +Add all the disks from the named libvirt guest. Domain UUIDs can be +used instead of names. + +=item B<--echo-keys> + +When prompting for keys and passphrases, virt-get-kernel normally turns +echoing off so you cannot see what you are typing. If you are not +worried about Tempest attacks and there is no one else in the room +you can specify this flag to see what you are typing. + +=item B<--format> raw|qcow2|.. + +=item B<--format> auto + +The default for the I<-a> option is to auto-detect the format of the +disk image. Using this forces the disk format for the I<-a> option +on the command line. + +If you have untrusted raw-format guest disk images, you should use +this option to specify the disk format. This avoids a possible +security problem with malicious guests (CVE-2010-3851). + +__INCLUDE:key-option.pod__ + +__INCLUDE:keys-from-stdin-option.pod__ + +=item B<-q> + +=item B<--quiet> + +Don’t print ordinary progress messages. + +=item B<-v> + +=item B<--verbose> + +Enable verbose messages for debugging. + +=item B<-V> + +=item B<--version> + +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. + +=back + +=head1 ENVIRONMENT VARIABLES + +For other environment variables which affect all libguestfs programs, +see L. + +=head1 EXIT STATUS + +This program returns 0 if successful, or non-zero if there was an +error. + +=head1 SEE ALSO + +L, +L, +L, +L, +L, +L, +L. + +=head1 AUTHOR + +Richard W.M. Jones L + +=head1 COPYRIGHT + +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/edit/Makefile.am b/edit/Makefile.am index 3545b66..e175b04 100644 --- a/edit/Makefile.am +++ b/edit/Makefile.am @@ -1,5 +1,5 @@ # libguestfs virt-edit -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/edit/Makefile.in b/edit/Makefile.in index 52794b5..1ba4920 100644 --- a/edit/Makefile.in +++ b/edit/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs virt-edit -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -488,7 +488,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -517,6 +516,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -587,6 +588,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/edit/edit.c b/edit/edit.c index 7f06bce..da996db 100644 --- a/edit/edit.c +++ b/edit/edit.c @@ -1,5 +1,5 @@ /* virt-edit - * Copyright (C) 2009-2020 Red Hat Inc. + * Copyright (C) 2009-2023 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 @@ -68,7 +68,7 @@ usage (int status) getprogname ()); else { printf (_("%s: Edit a file in a virtual machine\n" - "Copyright (C) 2009-2020 Red Hat Inc.\n" + "Copyright (C) 2009-2023 Red Hat Inc.\n" "Usage:\n" " %s [--options] -d domname file [file ...]\n" " %s [--options] -a disk.img [-a disk.img ...] file [file ...]\n" @@ -274,6 +274,9 @@ main (int argc, char *argv[]) /* Add drives. */ add_drives (drvs); + if (key_store_requires_network (ks) && guestfs_set_network (g, 1) == -1) + exit (EXIT_FAILURE); + if (guestfs_launch (g) == -1) exit (EXIT_FAILURE); diff --git a/edit/test-virt-edit.sh b/edit/test-virt-edit.sh index 740f2e8..feb412a 100755 --- a/edit/test-virt-edit.sh +++ b/edit/test-virt-edit.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/edit/virt-edit.pod b/edit/virt-edit.pod index 5ab6534..0a779b9 100644 --- a/edit/virt-edit.pod +++ b/edit/virt-edit.pod @@ -398,4 +398,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/format/Makefile.in b/format/Makefile.in index 5c25ab9..3aadc39 100644 --- a/format/Makefile.in +++ b/format/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -487,7 +487,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -516,6 +515,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -586,6 +587,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/get-kernel/Makefile.in b/get-kernel/Makefile.in index 8197569..6c947d1 100644 --- a/get-kernel/Makefile.in +++ b/get-kernel/Makefile.in @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -488,7 +488,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -517,6 +516,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -587,6 +588,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/get-kernel/get_kernel.ml b/get-kernel/get_kernel.ml index e485cf4..349beac 100644 --- a/get-kernel/get_kernel.ml +++ b/get-kernel/get_kernel.ml @@ -1,5 +1,5 @@ (* virt-get-kernel - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 @@ -41,7 +41,8 @@ let parse_cmdline () = let uri = try URI.parse_uri arg with URI.Parse_failed -> - error (f_"error parsing URI '%s'. Look for error messages printed above.") arg in + error (f_"error parsing URI '%s'. \ + Look for error messages printed above.") arg in file := Some uri and set_domain dom = if !domain <> None then @@ -90,9 +91,11 @@ read the man page virt-get-kernel(1). let add = match file, domain with | None, None -> - error (f_"you must give either -a or -d options. Read virt-get-kernel(1) man page for further information.") + error (f_"you must give either -a or -d options. \ + Read virt-get-kernel(1) man page for further information.") | Some _, Some _ -> - error (f_"you cannot give -a and -d options together. Read virt-get-kernel(1) man page for further information.") + error (f_"you cannot give -a and -d options together. \ + Read virt-get-kernel(1) man page for further information.") | None, Some dom -> fun (g : Guestfs.guestfs) -> let readonlydisk = "ignore" (* ignore CDs, data drives *) in @@ -176,6 +179,7 @@ let main () = (* Connect to libguestfs. *) let g = open_guestfs () in add g; + g#set_network (key_store_requires_network ks); g#launch (); (* Decrypt the disks. *) diff --git a/get-kernel/get_kernel.mli b/get-kernel/get_kernel.mli index ba4d473..4437e46 100644 --- a/get-kernel/get_kernel.mli +++ b/get-kernel/get_kernel.mli @@ -1,5 +1,5 @@ (* virt-get-kernel - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 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 diff --git a/get-kernel/virt-get-kernel.pod b/get-kernel/virt-get-kernel.pod index 0e3eba2..86ac2d4 100644 --- a/get-kernel/virt-get-kernel.pod +++ b/get-kernel/virt-get-kernel.pod @@ -10,7 +10,7 @@ virt-get-kernel - Extract kernel and ramdisk from guests =head1 DESCRIPTION -This option extracts the kernel and initramfs from a guest. +This program extracts the kernel and initramfs from a guest. The format of the disk image is automatically detected unless you specify it by using the I<--format> option. @@ -204,6 +204,7 @@ L, L, L, L, +L, L. =head1 AUTHOR @@ -212,4 +213,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2013-2020 Red Hat Inc. +Copyright (C) 2013-2023 Red Hat Inc. diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am index 3f5c47a..fffc0a0 100644 --- a/gnulib/lib/Makefile.am +++ b/gnulib/lib/Makefile.am @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2017-2021 Red Hat Inc. +# Copyright (C) 2017-2023 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 @@ -27,6 +27,8 @@ libgnu_la_SOURCES = \ argmatch.h \ bitrotate.h \ c-ctype.h \ + error.c \ + error.h \ getprogname.h \ hash.c \ hash.h \ diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in index 0b7bfb4..8b7893e 100644 --- a/gnulib/lib/Makefile.in +++ b/gnulib/lib/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs -# Copyright (C) 2017-2021 Red Hat Inc. +# Copyright (C) 2017-2023 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 @@ -36,7 +36,7 @@ # probably being moved to common/utils. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -171,8 +171,8 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libgnu_la_LIBADD = -am_libgnu_la_OBJECTS = argmatch.lo hash.lo human.lo xstrtol.lo \ - xstrtoul.lo xstrtoull.lo xstrtoumax.lo +am_libgnu_la_OBJECTS = argmatch.lo error.lo hash.lo human.lo \ + xstrtol.lo xstrtoul.lo xstrtoull.lo xstrtoumax.lo libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -193,10 +193,10 @@ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/argmatch.Plo ./$(DEPDIR)/hash.Plo \ - ./$(DEPDIR)/human.Plo ./$(DEPDIR)/xstrtol.Plo \ - ./$(DEPDIR)/xstrtoul.Plo ./$(DEPDIR)/xstrtoull.Plo \ - ./$(DEPDIR)/xstrtoumax.Plo +am__depfiles_remade = ./$(DEPDIR)/argmatch.Plo ./$(DEPDIR)/error.Plo \ + ./$(DEPDIR)/hash.Plo ./$(DEPDIR)/human.Plo \ + ./$(DEPDIR)/xstrtol.Plo ./$(DEPDIR)/xstrtoul.Plo \ + ./$(DEPDIR)/xstrtoull.Plo ./$(DEPDIR)/xstrtoumax.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -275,7 +275,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -304,6 +303,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -374,6 +375,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -520,6 +522,8 @@ libgnu_la_SOURCES = \ argmatch.h \ bitrotate.h \ c-ctype.h \ + error.c \ + error.h \ getprogname.h \ hash.c \ hash.h \ @@ -593,6 +597,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argmatch.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/human.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrtol.Plo@am__quote@ # am--include-marker @@ -763,6 +768,7 @@ clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ distclean: distclean-am -rm -f ./$(DEPDIR)/argmatch.Plo + -rm -f ./$(DEPDIR)/error.Plo -rm -f ./$(DEPDIR)/hash.Plo -rm -f ./$(DEPDIR)/human.Plo -rm -f ./$(DEPDIR)/xstrtol.Plo @@ -815,6 +821,7 @@ installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/argmatch.Plo + -rm -f ./$(DEPDIR)/error.Plo -rm -f ./$(DEPDIR)/hash.Plo -rm -f ./$(DEPDIR)/human.Plo -rm -f ./$(DEPDIR)/xstrtol.Plo diff --git a/gnulib/lib/argmatch.c b/gnulib/lib/argmatch.c index a2d9efe..85c9354 100644 --- a/gnulib/lib/argmatch.c +++ b/gnulib/lib/argmatch.c @@ -1,6 +1,6 @@ /* argmatch.c -- find a match for a string in an array - Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2021 Free Software + Copyright (C) 1990, 1998-1999, 2001-2007, 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/argmatch.h b/gnulib/lib/argmatch.h index ba30939..fa5db82 100644 --- a/gnulib/lib/argmatch.h +++ b/gnulib/lib/argmatch.h @@ -1,6 +1,6 @@ /* argmatch.h -- definitions and prototypes for argmatch.c - Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2021 Free Software + Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/bitrotate.h b/gnulib/lib/bitrotate.h index a0dbc70..43292d5 100755 --- a/gnulib/lib/bitrotate.h +++ b/gnulib/lib/bitrotate.h @@ -1,5 +1,5 @@ /* bitrotate.h - Rotate bits in integers - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. (NB: I modified the original GPL boilerplate here to LGPLv2+. This is because of the weird way that gnulib uses licenses, where the diff --git a/gnulib/lib/c-ctype.h b/gnulib/lib/c-ctype.h index 6c2030a..b0427f6 100644 --- a/gnulib/lib/c-ctype.h +++ b/gnulib/lib/c-ctype.h @@ -5,7 +5,7 @@ functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006, 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2006, 2008-2023 Free Software Foundation, Inc. (NB: I modified the original GPL boilerplate here to LGPLv2+. This is because of the weird way that gnulib uses licenses, where the diff --git a/gnulib/lib/error.c b/gnulib/lib/error.c new file mode 100644 index 0000000..6fb4fd8 --- /dev/null +++ b/gnulib/lib/error.c @@ -0,0 +1,356 @@ +/* Error handler for noninteractive utilities + Copyright (C) 1990-1998, 2000-2007, 2009-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Written by David MacKenzie . */ + +#include + +#ifndef HAVE_ERROR_H + +#include "error.h" + +#include +#include +#include +#include + +#include "getprogname.h" + +#ifndef _ +# define _(String) String +#endif + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +void (*error_print_progname) (void); + +/* This variable is incremented each time 'error' is called. */ +unsigned int error_message_count; + +#include +#include + +#if defined _WIN32 && ! defined __CYGWIN__ +/* Get declarations of the native Windows API functions. */ +# define WIN32_LEAN_AND_MEAN +# include +/* Get _get_osfhandle. */ +# if GNULIB_MSVC_NOTHROW +# include "msvc-nothrow.h" +# else +# include +# endif +#endif + +/* The gnulib override of fcntl is not needed in this file. */ +# undef fcntl + +# if !(GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R) +# ifndef HAVE_DECL_STRERROR_R +"this configure-time declaration test was not run" +# endif +# if STRERROR_R_CHAR_P +char *strerror_r (int errnum, char *buf, size_t buflen); +# else +int strerror_r (int errnum, char *buf, size_t buflen); +# endif +# endif + +# define program_name getprogname () + +#if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r +# define __strerror_r strerror_r +#endif /* GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r */ + +#if !_LIBC +/* Return non-zero if FD is open. */ +static int +is_open (int fd) +{ +# if defined _WIN32 && ! defined __CYGWIN__ + /* On native Windows: The initial state of unassigned standard file + descriptors is that they are open but point to an INVALID_HANDLE_VALUE. + There is no fcntl, and the gnulib replacement fcntl does not support + F_GETFL. */ + return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; +# else +# ifndef F_GETFL +# error Please port fcntl to your platform +# endif + return 0 <= fcntl (fd, F_GETFL); +# endif +} +#endif + +static void +flush_stdout (void) +{ +#if !_LIBC + int stdout_fd; + +# if GNULIB_FREOPEN_SAFER + /* Use of gnulib's freopen-safer module normally ensures that + fileno (stdout) == 1 + whenever stdout is open. */ + stdout_fd = STDOUT_FILENO; +# else + /* POSIX states that fileno (stdout) after fclose is unspecified. But in + practice it is not a problem, because stdout is statically allocated and + the fd of a FILE stream is stored as a field in its allocated memory. */ + stdout_fd = fileno (stdout); +# endif + /* POSIX states that fflush (stdout) after fclose is unspecified; it + is safe in glibc, but not on all other platforms. fflush (NULL) + is always defined, but too draconian. */ + if (0 <= stdout_fd && is_open (stdout_fd)) +#endif + fflush (stdout); +} + +static void +print_errno_message (int errnum) +{ + char const *s; + +#if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R + char errbuf[1024]; +# if _LIBC || (!GNULIB_STRERROR_R_POSIX && STRERROR_R_CHAR_P) + s = __strerror_r (errnum, errbuf, sizeof errbuf); +# else + if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) + s = errbuf; + else + s = 0; +# endif +#else + s = strerror (errnum); +#endif + +#if !_LIBC + if (! s) + s = _("Unknown system error"); +#endif + +#if _LIBC + __fxprintf (NULL, ": %s", s); +#else + fprintf (stderr, ": %s", s); +#endif +} + +static void +error_tail (int status, int errnum, const char *message, va_list args) +{ +#if _LIBC + if (_IO_fwide (stderr, 0) > 0) + { + size_t len = strlen (message) + 1; + wchar_t *wmessage = NULL; + mbstate_t st; + size_t res; + const char *tmp; + bool use_malloc = false; + + while (1) + { + if (__libc_use_alloca (len * sizeof (wchar_t))) + wmessage = (wchar_t *) alloca (len * sizeof (wchar_t)); + else + { + if (!use_malloc) + wmessage = NULL; + + wchar_t *p = (wchar_t *) realloc (wmessage, + len * sizeof (wchar_t)); + if (p == NULL) + { + free (wmessage); + fputws_unlocked (L"out of memory\n", stderr); + return; + } + wmessage = p; + use_malloc = true; + } + + memset (&st, '\0', sizeof (st)); + tmp = message; + + res = mbsrtowcs (wmessage, &tmp, len, &st); + if (res != len) + break; + + if (__builtin_expect (len >= SIZE_MAX / sizeof (wchar_t) / 2, 0)) + { + /* This really should not happen if everything is fine. */ + res = (size_t) -1; + break; + } + + len *= 2; + } + + if (res == (size_t) -1) + { + /* The string cannot be converted. */ + if (use_malloc) + { + free (wmessage); + use_malloc = false; + } + wmessage = (wchar_t *) L"???"; + } + + __vfwprintf (stderr, wmessage, args); + + if (use_malloc) + free (wmessage); + } + else +#endif + vfprintf (stderr, message, args); + + ++error_message_count; + if (errnum) + print_errno_message (errnum); +#if _LIBC + __fxprintf (NULL, "\n"); +#else + putc ('\n', stderr); +#endif + fflush (stderr); + if (status) + exit (status); +} + + +/* Print the program name and error message MESSAGE, which is a printf-style + format string with optional args. + If ERRNUM is nonzero, print its corresponding system error message. + Exit with status STATUS if it is nonzero. */ +void +error (int status, int errnum, const char *message, ...) +{ + va_list args; + +#if defined _LIBC && defined __libc_ptf_call + /* We do not want this call to be cut short by a thread + cancellation. Therefore disable cancellation for now. */ + int state = PTHREAD_CANCEL_ENABLE; + __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), + 0); +#endif + + flush_stdout (); +#ifdef _LIBC + _IO_flockfile (stderr); +#endif + if (error_print_progname) + (*error_print_progname) (); + else + { +#if _LIBC + __fxprintf (NULL, "%s: ", program_name); +#else + fprintf (stderr, "%s: ", program_name); +#endif + } + + va_start (args, message); + error_tail (status, errnum, message, args); + va_end (args); + +#ifdef _LIBC + _IO_funlockfile (stderr); +# ifdef __libc_ptf_call + __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); +# endif +#endif +} + +/* Sometimes we want to have at most one error per line. This + variable controls whether this mode is selected or not. */ +int error_one_per_line; + +void +error_at_line (int status, int errnum, const char *file_name, + unsigned int line_number, const char *message, ...) +{ + va_list args; + + if (error_one_per_line) + { + static const char *old_file_name; + static unsigned int old_line_number; + + if (old_line_number == line_number + && (file_name == old_file_name + || (old_file_name != NULL + && file_name != NULL + && strcmp (old_file_name, file_name) == 0))) + + /* Simply return and print nothing. */ + return; + + old_file_name = file_name; + old_line_number = line_number; + } + +#if defined _LIBC && defined __libc_ptf_call + /* We do not want this call to be cut short by a thread + cancellation. Therefore disable cancellation for now. */ + int state = PTHREAD_CANCEL_ENABLE; + __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), + 0); +#endif + + flush_stdout (); +#ifdef _LIBC + _IO_flockfile (stderr); +#endif + if (error_print_progname) + (*error_print_progname) (); + else + { +#if _LIBC + __fxprintf (NULL, "%s:", program_name); +#else + fprintf (stderr, "%s:", program_name); +#endif + } + +#if _LIBC + __fxprintf (NULL, file_name != NULL ? "%s:%u: " : " ", + file_name, line_number); +#else + fprintf (stderr, file_name != NULL ? "%s:%u: " : " ", + file_name, line_number); +#endif + + va_start (args, message); + error_tail (status, errnum, message, args); + va_end (args); + +#ifdef _LIBC + _IO_funlockfile (stderr); +# ifdef __libc_ptf_call + __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); +# endif +#endif +} + +#endif /* !HAVE_ERROR_H */ diff --git a/gnulib/lib/error.h b/gnulib/lib/error.h new file mode 100644 index 0000000..87e3bf5 --- /dev/null +++ b/gnulib/lib/error.h @@ -0,0 +1,53 @@ +/* Declaration for error-reporting function + Copyright (C) 1995-1997, 2003, 2006, 2008-2023 Free Software Foundation, + Inc. + This file is part of the GNU C Library. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file 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 Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#ifndef _ERROR_H +#define _ERROR_H 1 + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* Print a message with 'fprintf (stderr, FORMAT, ...)'; + if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). + If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */ + +extern void error (int __status, int __errnum, const char *__format, ...); + +extern void error_at_line (int __status, int __errnum, const char *__fname, + unsigned int __lineno, const char *__format, ...); + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +extern void (*error_print_progname) (void); + +/* This variable is incremented each time 'error' is called. */ +extern unsigned int error_message_count; + +/* Sometimes we want to have at most one error per line. This + variable controls whether this mode is selected or not. */ +extern int error_one_per_line; + +#ifdef __cplusplus +} +#endif + +#endif /* error.h */ diff --git a/gnulib/lib/getprogname.h b/gnulib/lib/getprogname.h index 68a4cb2..e0c7b63 100644 --- a/gnulib/lib/getprogname.h +++ b/gnulib/lib/getprogname.h @@ -1,5 +1,5 @@ /* libguestfs - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,6 +19,8 @@ #ifndef GUESTFS_GETPROGNAME #define GUESTFS_GETPROGNAME +#ifndef HAVE_GETPROGNAME + #include static inline char const * @@ -27,4 +29,6 @@ getprogname (void) return program_invocation_short_name; } +#endif + #endif /* GUESTFS_GETPROGNAME */ diff --git a/gnulib/lib/hash.c b/gnulib/lib/hash.c index f6c7518..96a4401 100755 --- a/gnulib/lib/hash.c +++ b/gnulib/lib/hash.c @@ -1,6 +1,6 @@ /* hash - hashing table processing. - Copyright (C) 1998-2004, 2006-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1998-2004, 2006-2007, 2009-2023 Free Software Foundation, Inc. Written by Jim Meyering, 1992. diff --git a/gnulib/lib/hash.h b/gnulib/lib/hash.h index 8db7c34..9c7d43b 100755 --- a/gnulib/lib/hash.h +++ b/gnulib/lib/hash.h @@ -1,5 +1,5 @@ /* hash - hashing table processing. - Copyright (C) 1998-1999, 2001, 2003, 2009-2021 Free Software Foundation, + Copyright (C) 1998-1999, 2001, 2003, 2009-2023 Free Software Foundation, Inc. Written by Jim Meyering , 1998. diff --git a/gnulib/lib/human.c b/gnulib/lib/human.c index 22545de..9f4f28e 100644 --- a/gnulib/lib/human.c +++ b/gnulib/lib/human.c @@ -1,6 +1,6 @@ /* human.c -- print human readable file size - Copyright (C) 1996-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1996-2007, 2009-2023 Free Software Foundation, 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 diff --git a/gnulib/lib/human.h b/gnulib/lib/human.h index 61f110f..c206cb5 100644 --- a/gnulib/lib/human.h +++ b/gnulib/lib/human.h @@ -1,6 +1,6 @@ /* human.h -- print human readable file size - Copyright (C) 1996-2007, 2009-2021 Free Software Foundation, Inc. + Copyright (C) 1996-2007, 2009-2023 Free Software Foundation, 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 diff --git a/gnulib/lib/ignore-value.h b/gnulib/lib/ignore-value.h index dac2d1a..5fced39 100755 --- a/gnulib/lib/ignore-value.h +++ b/gnulib/lib/ignore-value.h @@ -1,6 +1,6 @@ /* ignore a function return without a compiler warning. -*- coding: utf-8 -*- - Copyright (C) 2008-2021 Free Software Foundation, Inc. + Copyright (C) 2008-2023 Free Software Foundation, Inc. (NB: I modified the original GPL boilerplate here to LGPLv2+. This is because of the weird way that gnulib uses licenses, where the diff --git a/gnulib/lib/xalloc-oversized.h b/gnulib/lib/xalloc-oversized.h index 1e6acce..78fc0d9 100755 --- a/gnulib/lib/xalloc-oversized.h +++ b/gnulib/lib/xalloc-oversized.h @@ -1,6 +1,6 @@ /* xalloc-oversized.h -- memory allocation size checking - Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundation, Inc. + Copyright (C) 1990-2000, 2003-2004, 2006-2023 Free Software Foundation, Inc. (NB: I modified the original GPL boilerplate here to LGPLv2+. This is because of the weird way that gnulib uses licenses, where the diff --git a/gnulib/lib/xstrtol.c b/gnulib/lib/xstrtol.c index ee2f2ca..527e6f8 100644 --- a/gnulib/lib/xstrtol.c +++ b/gnulib/lib/xstrtol.c @@ -1,6 +1,6 @@ /* A more useful interface to strtol. - Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2021 Free Software + Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/xstrtol.h b/gnulib/lib/xstrtol.h index b873033..56da1a8 100644 --- a/gnulib/lib/xstrtol.h +++ b/gnulib/lib/xstrtol.h @@ -1,6 +1,6 @@ /* A more useful interface to strtol. - Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2021 Free Software + Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2023 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/inspector/Makefile.am b/inspector/Makefile.am index 297887b..8f4abbd 100644 --- a/inspector/Makefile.am +++ b/inspector/Makefile.am @@ -1,5 +1,5 @@ # libguestfs virt-inspector -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/inspector/Makefile.in b/inspector/Makefile.in index ecce8ad..c341e12 100644 --- a/inspector/Makefile.in +++ b/inspector/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs virt-inspector -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -492,7 +492,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -521,6 +520,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -591,6 +592,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/inspector/expected-coreos.img.xml b/inspector/expected-coreos.img.xml index 0cdfba6..2461bcf 100644 --- a/inspector/expected-coreos.img.xml +++ b/inspector/expected-coreos.img.xml @@ -8,6 +8,7 @@ 899 13 coreos.invalid + 2016-03-23-0120 coreos899.13 / diff --git a/inspector/expected-fedora-luks-on-lvm.img.xml b/inspector/expected-fedora-luks-on-lvm.img.xml index 6e21591..4fb8546 100644 --- a/inspector/expected-fedora-luks-on-lvm.img.xml +++ b/inspector/expected-fedora-luks-on-lvm.img.xml @@ -29,10 +29,57 @@ + + alternatives + 1.19 + 2.fc36 + x86_64 + https://github.com/fedora-sysv/chkconfig + A tool to maintain symbolic links determining default commands + alternatives creates, removes, maintains and displays information about the +symbolic links comprising the alternatives system. It is possible for several +programs fulfilling the same or similar functions to be installed on a single +system at the same time. + + + audit-libs + 3.0.8 + 1.fc37 + x86_64 + http://people.redhat.com/sgrubb/audit/ + Dynamic library for libaudit + The audit-libs package contains the dynamic libraries needed for +applications to use the audit framework. + + + authselect + 1.4.0 + 1.fc37 + x86_64 + https://github.com/authselect/authselect + Configures authentication and identity sources from supported profiles + Authselect is designed to be a replacement for authconfig but it takes +a different approach to configure the system. Instead of letting +the administrator build the PAM stack with a tool (which may potentially +end up with a broken configuration), it would ship several tested stacks +(profiles) that solve a use-case and are well tested and supported. +At the same time, some obsolete features of authconfig are not +supported by authselect. + + + authselect-libs + 1.4.0 + 1.fc37 + x86_64 + https://github.com/authselect/authselect + Utility library used by the authselect tool + Common library files for authselect. This package is used by the authselect +command line tool and any other potential front-ends. + basesystem 11 - 10.fc33 + 13.fc36 noarch (none) The skeleton package which defines a simple Fedora system @@ -43,8 +90,8 @@ should never be removed. bash - 5.0.17 - 2.fc33 + 5.1.16 + 2.fc36 x86_64 https://www.gnu.org/software/bash The GNU Bourne Again shell @@ -52,11 +99,307 @@ should never be removed. 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. + + + bzip2-libs + 1.0.8 + 11.fc36 + x86_64 + http://www.bzip.org/ + Libraries for applications using bzip2 + Libraries for applications using the bzip2 compression format. + + + ca-certificates + 2021.2.52 + 3.fc36 + noarch + https://fedoraproject.org/wiki/CA-Certificates + The Mozilla CA root certificate bundle + This package contains the set of CA certificates chosen by the +Mozilla Foundation for use with the Internet PKI. + + + coreutils + 9.1 + 2.fc37 + x86_64 + https://www.gnu.org/software/coreutils/ + A set of basic GNU tools commonly used in shell scripts + These are the GNU core utilities. This package is the combination of +the old GNU fileutils, sh-utils, and textutils packages. + + + coreutils-common + 9.1 + 2.fc37 + x86_64 + https://www.gnu.org/software/coreutils/ + coreutils common optional components + Optional though recommended components, +including documentation and translations. + + + cpio + 2.13 + 12.fc36 + x86_64 + https://www.gnu.org/software/cpio/ + A GNU archiving program + GNU cpio copies files into or out of a cpio or tar archive. Archives +are files which contain a collection of other files plus information +about them, such as their file name, owner, timestamps, and access +permissions. The archive can be another file on the disk, a magnetic +tape, or a pipe. GNU cpio supports the following archive formats: binary, +old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar and POSIX.1 +tar. By default, cpio creates binary format archives, so that they are +compatible with older cpio programs. When it is extracting files from +archives, cpio automatically recognizes which kind of archive it is reading +and can read archives created on machines with a different byte-order. + +Install cpio if you need a program to manage file archives. + + + cracklib + 2.9.6 + 28.fc36 + x86_64 + http://sourceforge.net/projects/cracklib/ + A password-checking library + CrackLib tests passwords to determine whether they match certain +security-oriented characteristics, with the purpose of stopping users +from choosing passwords that are easy to guess. CrackLib performs +several tests on passwords: it tries to generate words from a username +and gecos entry and checks those words against the password; it checks +for simplistic patterns in passwords; and it checks for the password +in a dictionary. + +CrackLib is actually a library containing a particular C function +which is used to check the password, as well as other C +functions. CrackLib is not a replacement for a passwd program; it must +be used in conjunction with an existing passwd program. + +Install the cracklib package if you need a program to check users' +passwords to see if they are at least minimally secure. If you install +CrackLib, you will also want to install the cracklib-dicts package. + + + crypto-policies + 20220428 + 1.gitdfb10ea.fc37 + noarch + https://gitlab.com/redhat-crypto/fedora-crypto-policies + System-wide crypto policies + This package provides pre-built configuration files with +cryptographic policies for various cryptographic back-ends, +such as SSL/TLS libraries. + + + crypto-policies-scripts + 20220428 + 1.gitdfb10ea.fc37 + noarch + https://gitlab.com/redhat-crypto/fedora-crypto-policies + Tool to switch between crypto policies + This package provides a tool update-crypto-policies, which applies +the policies provided by the crypto-policies package. These can be +either the pre-built policies from the base package or custom policies +defined in simple policy definition files. + +The package also provides a tool fips-mode-setup, which can be used +to enable or disable the system FIPS mode. + + + cryptsetup-libs + 2.4.3 + 2.fc36 + x86_64 + https://gitlab.com/cryptsetup/cryptsetup + Cryptsetup shared library + This package contains the cryptsetup shared library, libcryptsetup. + + + curl + 7.83.1 + 1.fc37 + x86_64 + https://curl.se/ + A utility for getting files from remote servers (FTP, HTTP, and others) + curl is a command line tool for transferring data with URL syntax, supporting +FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, +SMTP, POP3 and RTSP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP +uploading, HTTP form based upload, proxies, cookies, user+password +authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer +resume, proxy tunneling and a busload of other useful tricks. + + + cyrus-sasl-lib + 2.1.28 + 1.fc37 + x86_64 + https://www.cyrusimap.org/sasl/ + Shared libraries needed by applications which use Cyrus SASL + The cyrus-sasl-lib package contains shared libraries which are needed by +applications which use the Cyrus SASL library. + + + dbus + 1 + 1.14.0 + 1.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/dbus/ + D-BUS message bus + D-BUS is a system for sending messages between applications. It is +used both for the system-wide message bus service, and as a +per-user-login-session messaging facility. + + + dbus-broker + 31 + 1.fc37 + x86_64 + https://github.com/bus1/dbus-broker + Linux D-Bus Message Broker + dbus-broker is an implementation of a message bus as defined by the D-Bus +specification. Its aim is to provide high performance and reliability, while +keeping compatibility to the D-Bus reference implementation. It is exclusively +written for Linux systems, and makes use of many modern features provided by +recent Linux kernel releases. + + + dbus-common + 1 + 1.14.0 + 1.fc37 + noarch + https://www.freedesktop.org/wiki/Software/dbus/ + D-BUS message bus configuration + The dbus-common package provides the configuration and setup files for D-Bus +implementations to provide a System and User Message Bus. + + + device-mapper + 1.02.175 + 7.fc36 + x86_64 + https://www.sourceware.org/dm/ + Device mapper utility + This package contains the supporting userspace utility, dmsetup, +for the kernel device-mapper. + + + device-mapper-libs + 1.02.175 + 7.fc36 + x86_64 + https://sourceware.org/lvm2/ + Device-mapper shared library + This package contains the device-mapper shared library, libdevmapper. + + + diffutils + 3.8 + 2.fc36 + x86_64 + https://www.gnu.org/software/diffutils/diffutils.html + GNU collection of diff utilities + Diffutils includes four utilities: diff, cmp, diff3 and sdiff. Diff +compares two files and shows the differences, line by line. The cmp +command shows the offset and line numbers where two files differ, or +cmp can show the characters that differ between the two files. The +diff3 command shows the differences between three files. Diff3 can be +used when two people have made independent changes to a common +original; diff3 can produce a merged file that contains both sets of +changes and warnings about conflicts. The sdiff command can be used +to merge two files interactively. + +Install diffutils if you need to compare text files. + + + dracut + 056 + 2.fc37 + x86_64 + https://dracut.wiki.kernel.org/ + Initramfs generator using udev + dracut contains tools to create bootable initramfses for the Linux +kernel. Unlike other implementations, dracut hard-codes as little +as possible into the initramfs. dracut contains various modules which +are driven by the event-based udev. Having root on MD, DM, LVM2, LUKS +is supported as well as NFS, iSCSI, NBD, FCoE with the dracut-network +package. + + + elfutils-debuginfod-client + 0.187 + 4.fc37 + x86_64 + http://elfutils.org/ + Library and command line client for build-id HTTP ELF/DWARF server + The elfutils-debuginfod-client package contains shared libraries +dynamically loaded from -ldw, which use a debuginfod service +to look up debuginfo and associated data. Also includes a +command-line frontend. + + + elfutils-default-yama-scope + 0.187 + 4.fc37 + noarch + http://elfutils.org/ + Default yama attach scope sysctl setting + Yama sysctl setting to enable default attach scope settings +enabling programs to use ptrace attach, access to +/proc/PID/{mem,personality,stack,syscall}, and the syscalls +process_vm_readv and process_vm_writev which are used for +interprocess services, communication and introspection +(like synchronisation, signaling, debugging, tracing and +profiling) of processes. + + + elfutils-libelf + 0.187 + 4.fc37 + x86_64 + http://elfutils.org/ + Library to read and write ELF files + The elfutils-libelf package provides a DSO which allows reading and +writing ELF files on a high level. Third party programs depend on +this package to read internals of ELF files. The programs of the +elfutils package use it also to generate new ELF files. + + + elfutils-libs + 0.187 + 4.fc37 + x86_64 + http://elfutils.org/ + Libraries to handle compiled objects + The elfutils-libs package contains libraries which implement DWARF, ELF, +and machine-specific ELF handling and process introspection. These +libraries are used by the programs in the elfutils package. The +elfutils-devel package enables building other programs using these +libraries. + + + expat + 2.4.8 + 1.fc37 + x86_64 + https://libexpat.github.io/ + An XML parser library + This is expat, the C library for parsing XML, written by James Clark. Expat +is a stream oriented XML parser. This means that you register handlers with +the parser prior to starting the parse. These handlers are called when the +parser discovers the associated structures in the document being parsed. A +start tag is an example of the kind of structures for which you may +register handlers. fedora-gpg-keys - 33 - 3 + 37 + 0.2 noarch https://fedoraproject.org/ Fedora RPM keys @@ -64,8 +407,8 @@ incorporates useful features from the Korn shell (ksh) and the C shell fedora-release - 33 - 3 + 37 + 0.5 noarch https://fedoraproject.org/ Fedora release files @@ -74,8 +417,8 @@ and systemd preset files that determine which services are enabled by default. fedora-release-common - 33 - 3 + 37 + 0.5 noarch https://fedoraproject.org/ Fedora release files @@ -83,8 +426,8 @@ and systemd preset files that determine which services are enabled by default. fedora-release-identity-basic - 33 - 3 + 37 + 0.5 noarch https://fedoraproject.org/ Package providing the basic Fedora identity @@ -93,17 +436,48 @@ itself as a particular Edition or Spin. fedora-repos - 33 - 3 + 37 + 0.2 noarch https://fedoraproject.org/ Fedora package repositories Fedora package repository files for yum and dnf along with gpg public keys. + + fedora-repos-rawhide + 37 + 0.2 + noarch + https://fedoraproject.org/ + Rawhide repo definitions + This package provides the rawhide repo definitions. + + + file + 5.41 + 5.fc37 + x86_64 + https://www.darwinsys.com/file/ + Utility for determining file types + The file command is used to identify a particular file according to the +type of data contained by the file. File can identify many different +file types, including ELF binaries, system libraries, RPM packages, and +different graphics formats. + + + file-libs + 5.41 + 5.fc37 + x86_64 + https://www.darwinsys.com/file/ + Libraries for applications using libmagic + +Libraries for applications using libmagic. + filesystem - 3.14 - 3.fc33 + 3.16 + 2.fc36 x86_64 https://pagure.io/filesystem The basic directory layout for a Linux system @@ -112,10 +486,100 @@ on a Linux system. Filesystem contains the basic directory layout for a Linux operating system, including the correct permissions for the directories. + + findutils + 1 + 4.9.0 + 1.fc36 + x86_64 + https://www.gnu.org/software/findutils/ + The GNU versions of find utilities (find and xargs) + The findutils package contains programs which will help you locate +files on your system. The find utility searches through a hierarchy +of directories looking for files which match a certain set of criteria +(such as a file name pattern). The xargs utility builds and executes +command lines from standard input arguments (usually lists of file +names generated by the find command). + +You should install findutils because it includes tools that are very +useful for finding things on your system. + + + fuse-libs + 2.9.9 + 14.fc36 + x86_64 + http://fuse.sf.net + File System in Userspace (FUSE) v2 libraries + Devel With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains the FUSE v2 libraries. + + + gawk + 5.1.1 + 3.fc37 + x86_64 + https://www.gnu.org/software/gawk/ + The GNU version of the AWK text processing utility + The gawk package contains the GNU version of AWK text processing utility. AWK is +a programming language designed for text processing and typically used as a data +extraction and reporting tool. + +The gawk utility can be used to do quick and easy text pattern matching, +extracting or reformatting. It is considered to be a standard Linux tool for +text processing. + + + gawk-all-langpacks + 5.1.1 + 3.fc37 + x86_64 + https://www.gnu.org/software/gawk/ + Additional localisation files for gawk utility + The base package of gawk supports only the english localisation. This subpackage +contains additional localisation files. + + + gdbm-libs + 1 + 1.22 + 2.fc36 + x86_64 + http://www.gnu.org/software/gdbm/ + Libraries files for gdbm + Libraries for the Gdbm GNU database indexing library + + + gettext + 0.21 + 13.fc37.0.20220203 + x86_64 + https://www.gnu.org/software/gettext/ + GNU libraries and utilities for producing multi-lingual messages + The GNU gettext package provides a set of tools and documentation for +producing multi-lingual messages in programs. Tools include a set of +conventions about how programs should be written to support message +catalogs, a directory and file naming organization for the message +catalogs, a runtime library which supports the retrieval of translated +messages, and stand-alone programs for handling the translatable and +the already translated strings. Gettext provides an easy to use +library and tools for creating, using, and modifying natural language +catalogs and is a powerful and simple method for internationalizing +programs. + + + gettext-libs + 0.21 + 13.fc37.0.20220203 + x86_64 + https://www.gnu.org/software/gettext/ + Libraries for gettext + This package contains libraries used internationalization support. + glibc - 2.32 - 4.fc33 + 2.35.9000 + 20.fc37 x86_64 http://www.gnu.org/software/glibc/ The GNU libc libraries @@ -127,115 +591,1670 @@ 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 + 2.35.9000 + 20.fc37 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. + + + glibc-gconv-extra + 2.35.9000 + 20.fc37 + x86_64 + http://www.gnu.org/software/glibc/ + All iconv converter modules for glibc. + This package contains all iconv converter modules built in glibc. + + + glibc-minimal-langpack + 2.35.9000 + 20.fc37 + x86_64 + http://www.gnu.org/software/glibc/ + Minimal language packs for glibc. + This is a Meta package that is used to install minimal language packs. +This package ensures you can use C, POSIX, or C.UTF-8 locales, but +nothing else. It is designed for assembling a minimal system. + + + gmp + 1 + 6.2.1 + 2.fc36 + x86_64 + https://gmplib.org/ + GNU arbitrary precision library + The gmp package contains GNU MP, a library for arbitrary precision +arithmetic, signed integers operations, rational numbers and floating +point numbers. GNU MP is designed for speed, for both small and very +large operands. GNU MP is fast because it uses fullwords as the basic +arithmetic type, it uses fast algorithms, it carefully optimizes +assembly code for many CPUs' most common inner loops, and it generally +emphasizes speed over simplicity/elegance in its operations. + +Install the gmp package if you need a fast arbitrary precision +library. gpg-pubkey - 9570ff31 - 5e3006fb + eb10b464 + 6202d9c6 (none) (none) - Fedora (33) <fedora-33-primary@fedoraproject.org> public key + Fedora (38) <fedora-38-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 +Version: rpm-4.17.0 (NSS-3) + +mQINBGIC2cYBEADJye1aE0AR17qwj6wsHWlCQlcihmqkL8s4gbOk1IevBbH4iXJx +lu6bN+NhTcCCX6eHmaL5Pwb/bpkMmLR+/r1D2cLDK24YzvN6kJnwRQUTf2dbqYmg +mNBgIMm+kAabBZPwUHUzyQ9CT/WJpYr1OYu8JIkdxF35nrPewnnOUUqxqbi8fXRQ +gskSLF8UveiOjFIqmWwlPwT1UtnevAaF80UGQlkwFvqjjh4b9vKY2gHMAQwt+wg5 +HFFCSwSrnd88ZoDb3pKvDMeurYUiPzF5f2r+ziVkMuaSNckvp58uge7HvyqQPAdJ +ZRswCCxhUAo9VqkNfB4Ud25ASyalk9jOE3HB8E35gFfPXvuX1n15THXNcwMEiybk +Omne2YwXL8ShGNr5otjqywThMrrqcl2g/pJVTcpDHTR5Hn9YRp+GHlYLjyEr+/x7 +xM19y9ca9GUiJqDbEREHcKKIhYiGmcIjjcJvei/3C/aM4pqeGFJBbVSnw3qeMxH/ +6ArAMA1sAdShCkv2YjlcF0r4uoCjXdS3xrKLz9PSCquot7RySnOE9TZ7flfJll7Z +q+lNaSeJg7FK8VWSUb9Lit6VEYVbzWKzespDDbujrHbFpydyq8gXurk7bSR2w0te +gsmytQqT/w1z2bydgGF6SfY9Px0wuA8GQKr48l5Bhdc6+vHHFqPKzz0PVQARAQAB +tDFGZWRvcmEgKDM4KSA8ZmVkb3JhLTM4LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v +cmc+iQJOBBMBCAA4FiEEalG7q7o9VGe2FxIhgJqNfOsQtGQFAmIC2cYCGw8FCwkI +BwIGFQoJCAsCBBYCAwECHgECF4AACgkQgJqNfOsQtGScyw/7BLmD4Fwi4QZY94zl +vlJdNufZRavOemSIVVDHoCr8pQBAdrvoMypxJd5zM4ODIqFsjdYpFti+Tkeq4/4U +25UoLPEOtU8UDt2uq7LqfdCxspaj7VyXAJIkpf7wEvLS4Jzo+YaMIlsd0dCrMXTM +vhu4gKpBFW6C+gGlmuDyTJbyrf7ilytgVzVtIfRrT7XffylviIlZHwKm43UDjvzX +YEl3EAFR1RjATwXMy2aJh7GCNsz+fKs+7YRKQUhpMF5un/2pyNJO+LbVGGwGZvga +K9Kfsg/4r1ync4nDDD1dadKIHhobDeiJ9uZLoBvvVDz7Ywu7q/vv4zIPxstYBNq4 +6fLKDtYXuJCK0EV9Qy4ox67t0UGlaRGH8y5YUqOI10xH7iQej0xWlSc8w2dKhPz8 +z9XLv2OMK+PvqvflhFHhWkqEoQRqTu0TVD0fLLe4lqieJlqZcJqW0F9G/vNSSWmf +POLa/Nim71gL2fPjCJOIRV4K/cJSyBmu5NchG7dHD5sUtJxZ4TFSuepaBZ8cPK1x +e26TaCBqoUWgUXWmw+P89aOpYOJYEFfT/VAm2Ywn+c1EFUmD+30wQ7aP/RUFl94z +n0BjqsWDnCKVFHydZ0TZSpeADmXMg2VYZPcp/cQR1KjoBoDxAscis7b1XPQUg7CB +zquq5jBVAnsNIhs7g47GWKyDUJM= +=aCLl -----END PGP PUBLIC KEY BLOCK----- - libgcc - 10.2.1 - 9.fc33 + gpg-pubkey + 5323552a + 6112bcdc + (none) + (none) + Fedora (37) <fedora-37-primary@fedoraproject.org> public key + -----BEGIN PGP PUBLIC KEY BLOCK----- +Version: rpm-4.17.0 (NSS-3) + +mQINBGESvNwBEAC7HsCDTlugVeDSMFX6aW3zAPFMfvBssNj+89fdmbxcI9t7UY6f +HvkkGziUET8e+9jB8R2/wXQCGOw1J+sfmwO4aN0LdVQjhKvVNj+F5jWt3m5FAIBa +OTWS6Kvqw2ECTpH7fD86541eK3BuCni6d5U3PCd73t976FcUmpQ/1AthqMksM0Jz +cJapvNmLTCR0NZ2XyyLmn/K1hgNXe8G5j0cSrJiY+Zpz5aQkT96j96Jm6W2A+tBI +icU4n6V4vlj2TxmCumtXJGXGBGJnof/dCgh45aqi+sk5c429ns+5sooYcaEJojj6 +FYSITv10l+az6ZMJz/j61VYSkhMY8hQ4Wd+yL2JVzLE9N9V0L95sX1yEZ5ILmzwx +oRKe4WHSBE6yMxNWobv7hmC+3ZC5mLPaEDS/g/0xuQj9Sy9eT2mhhFPxOv29YQ+P +sC3zXHJMMT0tlGd72PVHQQ0JYONfMhcC+7AHGFGz8p4/wor2jIFG1ouqE6Lfzm8o +XWZMYm3AydlrP/xkYaoWNE3jL/+dskSBr/Yz7ZzlkAqH9lb1HKnXQLTrw6gz6pmI +KufSDXjEFNxnFI/9gMlshJtk5+QSDzezmxFm+NMviSvDUNAVIzrU1D84dauBYph4 +OrJVeECQHEotny/I53AdlVwLYB4TWkObzTs6vtV7Pz1TK2CmHpe3UW72xwARAQAB +tDFGZWRvcmEgKDM3KSA8ZmVkb3JhLTM3LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v +cmc+iQJOBBMBCAA4FiEErLXuToMcdLt8Fo0n9VrT+1MjVSoFAmESvNwCGw8FCwkI +BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ9VrT+1MjVSoPMhAAist7kK/YtcyBL/dt +P55hPrkJT6Ay+e2Dvt4Pixe4iT32Y3jG12aoX2LY//mxVOOpV+EhXYTTb5aLt2Jj +a8/qCKJFk7zuCOxa1hgdRcjoR7ZbU0lNjD9mMCax/YT9QafcaMEib/FlknP3g1SN +GRSKLObTJd6BbtZXCE80JRIX+Dy6+/Oz7LXRXeKpiimhlXT1wuTaqAJEtuHdQvg7 +dkL4DzAJ2FiURVd5gvgo266WaCMafJjFRrSGHJm0c+V+0Z9NsuH80JbPm+rCUh5U +E9PMyztqlqtldtqc1+aZ1iUbVuXY059BUmlAhmf5sAlBktY+hEabH/4kmfGccbBL +TyBIn03Y9q9173okZSUe6q16m/hbbWI8dwkSpIADZbGGJbRi8PJpCg9y6KI355qD +atE2irleoy6eXqpKa+uPTRBk7i/r6jDoA+u+tZyFfcEnwvSWP8cN1j5mNklvITZl +YF1n5b3fejkZVdOmRZQNkyzMxYEd4UZFQZNYrx0nltAagRS8b5ikqNk2UTl+dyBG +k9gLOSZhAa2JdmAqwe9rT69jaa4kZMLlxPPC3246s83t0s7lp7vF+zLPfPSvxpsU +tg+fuT+OFKWYdBFF7VkEA+wezHAznIP6TPyQXbBpkzE889/hOXy4BYs0wy8Bpda/ +Ve2Ba329f99dSCZKImi5DPCxJY4= +=ZmVd +-----END PGP PUBLIC KEY BLOCK----- + + + + grep + 3.7 + 2.fc36 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. + https://www.gnu.org/software/grep/ + Pattern matching utilities + The GNU versions of commonly used grep utilities. Grep searches through +textual input for lines which contain a match to a specified pattern and then +prints the matching lines. GNU's grep utilities include grep, egrep and fgrep. + +GNU grep is needed by many scripts, so it shall be installed on every system. - ncurses-base - 6.2 - 3.20200222.fc33 + grub2-common + 1 + 2.06 + 41.fc37 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. + http://www.gnu.org/software/grub/ + grub2 common layout + This package provides some directories which are required by various grub2 +subpackages. - ncurses-libs - 6.2 - 3.20200222.fc33 + grub2-tools + 1 + 2.06 + 41.fc37 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. + http://www.gnu.org/software/grub/ + Support tools for GRUB. + +The GRand Unified Bootloader (GRUB) is a highly configurable and +customizable bootloader with modular architecture. It supports a rich +variety of kernel formats, file systems, computer architectures and +hardware devices. -This package contains the ncurses libraries. +This subpackage provides tools for support of all platforms. - 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. + grub2-tools-minimal + 1 + 2.06 + 41.fc37 + x86_64 + http://www.gnu.org/software/grub/ + Support tools for GRUB. + +The GRand Unified Bootloader (GRUB) is a highly configurable and +customizable bootloader with modular architecture. It supports a rich +variety of kernel formats, file systems, computer architectures and +hardware devices. + +This subpackage provides tools for support of all platforms. - tzdata - 2021a - 1.fc33 + grubby + 8.40 + 60.fc37 + x86_64 + (none) + Command line tool for updating bootloader configs + This package provides a grubby compatibility script that manages +BootLoaderSpec files and is meant to be backward compatible with +the previous grubby tool. + + + gzip + 1.12 + 1.fc37 + x86_64 + https://www.gzip.org/ + GNU data compression program + The gzip package contains the popular GNU gzip data compression +program. Gzipped files have a .gz extension. + +Gzip should be installed on your system, because it is a +very commonly used data compression program. + + + json-c + 0.16 + 1.fc37 + x86_64 + https://github.com/json-c/json-c + JSON implementation in C + JSON-C implements a reference counting object model that allows you +to easily construct JSON objects in C, output them as JSON formatted +strings and parse JSON formatted strings back into the C representation +of JSON objects. It aims to conform to RFC 7159. + + + kbd + 2.4.0 + 9.fc36 + x86_64 + http://www.kbd-project.org/ + Tools for configuring the console (keyboard, virtual terminals, etc.) + The kbd package contains tools for managing a Linux +system's console's behavior, including the keyboard, the screen +fonts, the virtual terminals and font files. + + + kbd-misc + 2.4.0 + 9.fc36 noarch - https://www.iana.org/time-zones - Timezone data - This package contains data files with rules for various timezones around -the world. + http://www.kbd-project.org/ + Data for kbd package + The kbd-misc package contains data for kbd package - console fonts, +keymaps etc. Please note that kbd-misc is not helpful without kbd. + + + kernel + 5.19.0 + 0.rc1.14.fc37 + x86_64 + https://www.kernel.org/ + The Linux kernel + The kernel meta package + + + kernel-core + 5.19.0 + 0.rc1.14.fc37 + x86_64 + https://www.kernel.org/ + The Linux kernel + The kernel package contains the Linux kernel (vmlinuz), the core of any +Linux operating system. The kernel handles the basic functions +of the operating system: memory allocation, process allocation, device +input and output, etc. + + + kernel-modules + 5.19.0 + 0.rc1.14.fc37 + x86_64 + https://www.kernel.org/ + kernel modules to match the core kernel + This package provides commonly used kernel modules for the core kernel package. + + + keyutils-libs + 1.6.1 + 4.fc36 + x86_64 + http://people.redhat.com/~dhowells/keyutils/ + Key utilities library + This package provides a wrapper library for the key management facility system +calls. + + + kmod + 29 + 7.fc36 + x86_64 + https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git + Linux kernel module management utilities + The kmod package provides various programs needed for automatic +loading and unloading of modules under 2.6, 3.x, and later kernels, as well +as other module management programs. Device drivers and filesystems are two +examples of loaded and unloaded modules. + + + kmod-libs + 29 + 7.fc36 + x86_64 + https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git + Libraries to handle kernel module loading and unloading + The kmod-libs package provides runtime libraries for any application that +wishes to load or unload Linux kernel modules from the running system. + + + kpartx + 0.8.9 + 1.fc37 + x86_64 + http://christophe.varoqui.free.fr/ + Partition device manager for device-mapper devices + kpartx manages partition creation and removal for device-mapper devices. + + + krb5-libs + 1.19.2 + 9.fc37 + x86_64 + https://web.mit.edu/kerberos/www/ + The non-admin shared libraries used by Kerberos 5 + Kerberos is a network authentication system. The krb5-libs package +contains the shared libraries needed by Kerberos 5. If you are using +Kerberos, you need to install this package. + + + libacl + 2.3.1 + 3.fc36 + x86_64 + https://savannah.nongnu.org/projects/acl + Dynamic library for access control list support + This package contains the libacl.so dynamic library which contains +the POSIX 1003.1e draft standard 17 functions for manipulating access +control lists. + + + libarchive + 3.6.1 + 1.fc37 + x86_64 + https://www.libarchive.org/ + A library for handling streaming archive formats + Libarchive is a programming library that can create and read several different +streaming archive formats, including most popular tar variants, several cpio +formats, and both BSD and GNU ar variants. It can also write shar archives and +read ISO9660 CDROM images and ZIP archives. + + + libargon2 + 20171227 + 9.fc37 + x86_64 + https://github.com/P-H-C/phc-winner-argon2 + The password-hashing library + Argon2 is a password-hashing function that summarizes the state of the art +in the design of memory-hard functions and can be used to hash passwords +for credential storage, key derivation, or other applications. + + + libattr + 2.5.1 + 4.fc36 + x86_64 + https://savannah.nongnu.org/projects/attr + Dynamic library for extended attribute support + This package contains the libattr.so dynamic library which contains +the extended attribute system calls and library functions. + + + libblkid + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Block device ID library + This is block device identification library, part of util-linux. + + + libbpf + 2 + 0.8.0 + 1.fc37 + x86_64 + https://github.com/libbpf/libbpf + Libbpf library + A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its +supporting header files. The version of the package reflects the version of +ABI. + + + libbrotli + 1.0.9 + 7.fc36 + x86_64 + https://github.com/google/brotli + Library for brotli lossless compression algorithm + Brotli is a generic-purpose lossless compression algorithm that compresses +data using a combination of a modern variant of the LZ77 algorithm, Huffman +coding and 2nd order context modeling, with a compression ratio comparable +to the best currently available general-purpose compression methods. +It is similar in speed with deflate but offers more dense compression. + + + libcap + 2.48 + 4.fc36 + x86_64 + https://sites.google.com/site/fullycapable/ + Library for getting and setting POSIX.1e capabilities + libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) +draft 15 capabilities. + + + libcap-ng + 0.8.3 + 1.fc37 + x86_64 + https://people.redhat.com/sgrubb/libcap-ng/ + Alternate posix capabilities library + Libcap-ng is a library that makes using posix capabilities easier + + + libcbor + 0.7.0 + 5.fc36 + x86_64 + http://libcbor.org + A CBOR parsing library + libcbor is a C library for parsing and generating CBOR. + + + libcom_err + 1.46.5 + 2.fc36 + x86_64 + http://e2fsprogs.sourceforge.net/ + Common error description library + This is the common error description library, part of e2fsprogs. + +libcom_err is an attempt to present a common error-handling mechanism. + + + libcurl + 7.83.1 + 1.fc37 + x86_64 + https://curl.se/ + A library for getting files from web servers + libcurl is a free and easy-to-use client-side URL transfer library, supporting +FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, +SMTP, POP3 and RTSP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, +FTP uploading, HTTP form based upload, proxies, cookies, user+password +authentication (Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer +resume, http proxy tunneling and more. + + + libdb + 5.3.28 + 52.fc37 + x86_64 + http://www.oracle.com/database/berkeley-db/ + The Berkeley DB database library for C + The Berkeley Database (Berkeley DB) is a programmatic toolkit that +provides embedded database support for both traditional and +client/server applications. The Berkeley DB includes B+tree, Extended +Linear Hashing, Fixed and Variable-length record access methods, +transactions, locking, logging, shared memory caching, and database +recovery. The Berkeley DB supports C, C++, and Perl APIs. It is +used by many applications, including Python and Perl, so this should +be installed on all systems. + + + libeconf + 0.4.0 + 3.fc36 + x86_64 + https://github.com/openSUSE/libeconf + Enhanced config file parser library + libeconf is a highly flexible and configurable library to parse and manage +key=value configuration files. It reads configuration file snippets from +different directories and builds the final configuration file from it. + + + libevent + 2.1.12 + 6.fc36 + x86_64 + http://libevent.org/ + Abstract asynchronous event notification library + The libevent API provides a mechanism to execute a callback function +when a specific event occurs on a file descriptor or after a timeout +has been reached. libevent is meant to replace the asynchronous event +loop found in event driven network servers. An application just needs +to call event_dispatch() and can then add or remove events dynamically +without having to change the event loop. + + + libfdisk + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Partitioning library for fdisk-like programs + This is library for fdisk-like programs, part of util-linux. + + + libffi + 3.4.2 + 8.fc36 + x86_64 + http://sourceware.org/libffi + A portable foreign function interface library + Compilers for high level languages generate code that follow certain +conventions. These conventions are necessary, in part, for separate +compilation to work. One such convention is the "calling convention". +The calling convention is a set of assumptions made by the compiler +about where function arguments will be found on entry to a function. A +calling convention also specifies where the return value for a function +is found. + +Some programs may not know at the time of compilation what arguments +are to be passed to a function. For instance, an interpreter may be +told at run-time about the number and types of arguments used to call a +given function. `Libffi' can be used in such programs to provide a +bridge from the interpreter program to compiled code. + +The `libffi' library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run time. + +FFI stands for Foreign Function Interface. A foreign function +interface is the popular name for the interface that allows code +written in one language to call code written in another language. The +`libffi' library really only provides the lowest, machine dependent +layer of a fully featured foreign function interface. A layer must +exist above `libffi' that handles type conversions for values passed +between the two languages. + + + libfido2 + 1.11.0 + 1.fc37 + x86_64 + https://github.com/Yubico/libfido2 + FIDO2 library + libfido2 is an open source library to support the FIDO2 protocol. FIDO2 is +an open authentication standard that consists of the W3C Web Authentication +specification (WebAuthn API), and the Client to Authentication Protocol +(CTAP). CTAP is an application layer protocol used for communication +between a client (browser) or a platform (operating system) with an external +authentication device (for example the Yubico Security Key). + + + libgcc + 12.1.1 + 1.fc37 + x86_64 + http://gcc.gnu.org + GCC version 12 shared support library + This package contains GCC shared support library which is needed +e.g. for exception handling support. + + + libgcrypt + 1.10.1 + 3.fc37 + x86_64 + https://www.gnupg.org/ + A general-purpose cryptography library + Libgcrypt is a general purpose crypto library based on the code used +in GNU Privacy Guard. This is a development version. + + + libgomp + 12.1.1 + 1.fc37 + x86_64 + http://gcc.gnu.org + GCC OpenMP v4.5 shared support library + This package contains GCC shared support library which is needed +for OpenMP v4.5 support. + + + libgpg-error + 1.45 + 1.fc37 + x86_64 + https://www.gnupg.org/related_software/libgpg-error/ + Library for error values used by GnuPG components + This is a library that defines common error values for all GnuPG +components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, +pinentry, SmartCard Daemon and possibly more in the future. + + + libidn2 + 2.3.2 + 4.fc36 + x86_64 + https://www.gnu.org/software/libidn/#libidn2 + Library to support IDNA2008 internationalized domain names + Libidn2 is an implementation of the IDNA2008 specifications in RFC +5890, 5891, 5892, 5893 and TR46 for internationalized domain names +(IDN). It is a standalone library, without any dependency on libidn. + + + libkcapi + 1.3.1 + 4.fc36 + x86_64 + https://www.chronox.de/libkcapi.html + User space interface to the Linux Kernel Crypto API + libkcapi allows user-space to access the Linux kernel crypto API. + +This library uses the netlink interface and exports easy to use APIs +so that a developer does not need to consider the low-level netlink +interface handling. + +The library does not implement any cipher algorithms. All consumer +requests are sent to the kernel for processing. Results from the +kernel crypto API are returned to the consumer via the library API. + +The kernel interface and therefore this library can be used by +unprivileged processes. + + + libkcapi-hmaccalc + 1.3.1 + 4.fc36 + x86_64 + https://www.chronox.de/libkcapi.html + Drop-in replacements for hmaccalc provided by the libkcapi package + Provides drop-in replacements for sha*hmac tools (from package +hmaccalc) using libkcapi. + + + libmount + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Device mounting library + This is the device mounting library, part of util-linux. + + + libnghttp2 + 1.47.0 + 1.fc37 + x86_64 + https://nghttp2.org/ + A library implementing the HTTP/2 protocol + libnghttp2 is a library implementing the Hypertext Transfer Protocol +version 2 (HTTP/2) protocol in C. + + + libnsl2 + 2.0.0 + 3.fc36 + x86_64 + https://github.com/thkukuk/libnsl + Public client interface library for NIS(YP) and NIS+ + This package contains the libnsl library. This library contains +the public client interface for NIS(YP) and NIS+. +This code was formerly part of glibc, but is now standalone to +be able to link against TI-RPC for IPv6 support. + + + libpsl + 0.21.1 + 5.fc36 + x86_64 + https://rockdaboot.github.io/libpsl + C library for the Publix Suffix List + libpsl is a C library to handle the Public Suffix List. A "public suffix" is a +domain name under which Internet users can directly register own names. + +Browsers and other web clients can use it to + +- Avoid privacy-leaking "supercookies"; +- Avoid privacy-leaking "super domain" certificates; +- Domain highlighting parts of the domain in a user interface; +- Sorting domain lists by site; + +Libpsl... + +- has built-in PSL data for fast access; +- allows to load PSL data from files; +- checks if a given domain is a "public suffix"; +- provides immediate cookie domain verification; +- finds the longest public part of a given domain; +- finds the shortest private part of a given domain; +- works with international domains (UTF-8 and IDNA2008 Punycode); +- is thread-safe; +- handles IDNA2008 UTS#46; + + + libpwquality + 1.4.4 + 7.fc36 + x86_64 + https://github.com/libpwquality/libpwquality/ + A library for password generation and password quality checking + This is a library for password quality checks and generation +of random passwords that pass the checks. +This library uses the cracklib and cracklib dictionaries +to perform some of the checks. + + + libseccomp + 2.5.3 + 2.fc36 + x86_64 + https://github.com/seccomp/libseccomp + Enhanced seccomp library + The libseccomp library provides an easy to use interface to the Linux Kernel's +syscall filtering mechanism, seccomp. The libseccomp API allows an application +to specify which syscalls, and optionally which syscall arguments, the +application is allowed to execute, all of which are enforced by the Linux +Kernel. + + + libselinux + 3.4 + 0.rc3.1.fc37 + x86_64 + https://github.com/SELinuxProject/selinux/wiki + SELinux library and simple utilities + Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libselinux provides an API for SELinux applications to get and set +process and file security contexts and to obtain security policy +decisions. Required for any applications that use the SELinux API. + + + libsemanage + 3.4 + 0.rc3.1.fc37 + x86_64 + https://github.com/SELinuxProject/selinux/wiki + SELinux binary policy manipulation library + Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libsemanage provides an API for the manipulation of SELinux binary policies. +It is used by checkpolicy (the policy compiler) and similar tools, as well +as by programs like load_policy that need to perform specific transformations +on binary policies such as customizing policy boolean settings. + + + libsepol + 3.4 + 0.rc3.1.fc37 + x86_64 + https://github.com/SELinuxProject/selinux/wiki + SELinux binary policy manipulation library + Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libsepol provides an API for the manipulation of SELinux binary policies. +It is used by checkpolicy (the policy compiler) and similar tools, as well +as by programs like load_policy that need to perform specific transformations +on binary policies such as customizing policy boolean settings. + + + libsigsegv + 2.14 + 2.fc36 + x86_64 + https://www.gnu.org/software/libsigsegv/ + Library for handling page faults in user mode + This is a library for handling page faults in user mode. A page fault +occurs when a program tries to access to a region of memory that is +currently not available. Catching and handling a page fault is a useful +technique for implementing: + - pageable virtual memory + - memory-mapped access to persistent databases + - generational garbage collectors + - stack overflow handlers + - distributed shared memory + + + libsmartcols + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Formatting library for ls-like programs + This is library for ls-like terminal programs, part of util-linux. + + + libssh + 0.9.6 + 4.fc36 + x86_64 + http://www.libssh.org + A library implementing the SSH protocol + The ssh library was designed to be used by programmers needing a working SSH +implementation by the mean of a library. The complete control of the client is +made by the programmer. With libssh, you can remotely execute programs, transfer +files, use a secure and transparent tunnel for your remote programs. With its +Secure FTP implementation, you can play with remote files easily, without +third-party programs others than libcrypto (from openssl). + + + libssh-config + 0.9.6 + 4.fc36 + noarch + http://www.libssh.org + Configuration files for libssh + The libssh-config package provides the default configuration files for libssh. + + + libstdc++ + 12.1.1 + 1.fc37 + x86_64 + http://gcc.gnu.org + GNU Standard C++ Library + The libstdc++ package contains a rewritten standard compliant GCC Standard +C++ Library. + + + libtasn1 + 4.18.0 + 2.fc36 + x86_64 + http://www.gnu.org/software/libtasn1/ + The ASN.1 library used in GNUTLS + A library that provides Abstract Syntax Notation One (ASN.1, as specified +by the X.680 ITU-T recommendation) parsing and structures management, and +Distinguished Encoding Rules (DER, as per X.690) encoding and decoding functions. + + + libtirpc + 1.3.2 + 1.rc1.fc36.1 + x86_64 + http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary + Transport Independent RPC Library + This package contains SunLib's implementation of transport-independent +RPC (TI-RPC) documentation. This library forms a piece of the base of +Open Network Computing (ONC), and is derived directly from the +Solaris 2.3 source. + +TI-RPC is an enhanced version of TS-RPC that requires the UNIX System V +Transport Layer Interface (TLI) or an equivalent X/Open Transport Interface +(XTI). TI-RPC is on-the-wire compatible with the TS-RPC, which is supported +by almost 70 vendors on all major operating systems. TS-RPC source code +(RPCSRC 4.0) remains available from several internet sites. + + + libunistring + 1.0 + 1.fc36 + x86_64 + https://www.gnu.org/software/libunistring/ + GNU Unicode string library + This portable C library implements Unicode string types in three flavours: +(UTF-8, UTF-16, UTF-32), together with functions for character processing +(names, classifications, properties) and functions for string processing +(iteration, formatted output, width, word breaks, line breaks, normalization, +case folding and regular expressions). + + + libutempter + 1.2.1 + 6.fc36 + x86_64 + ftp://ftp.altlinux.org/pub/people/ldv/utempter + A privileged helper for utmp/wtmp updates + This library provides interface for terminal emulators such as +screen and xterm to record user sessions to utmp and wtmp files. + + + libuuid + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Universally unique ID library + This is the universally unique ID library, part of util-linux. + +The libuuid library generates and parses 128-bit universally unique +id's (UUID's). A UUID is an identifier that is unique across both +space and time, with respect to the space of all UUIDs. A UUID can +be used for multiple purposes, from tagging objects with an extremely +short lifetime, to reliably identifying very persistent objects +across a network. + +See also the "uuid" package, which is a separate implementation. + + + libverto + 0.3.2 + 3.fc36 + x86_64 + https://github.com/latchset/libverto + Main loop abstraction library + libverto provides a way for libraries to expose asynchronous interfaces +without having to choose a particular event loop, offloading this +decision to the end application which consumes the library. + +If you are packaging an application, not library, based on libverto, +you should depend either on a specific implementation module or you +can depend on the virtual provides 'libverto-module-base'. This will +ensure that you have at least one module installed that provides io, +timeout and signal functionality. Currently glib is the only module +that does not provide these three because it lacks signal. However, +glib will support signal in the future. + + + libxcrypt + 4.4.28 + 1.fc37 + x86_64 + https://github.com/besser82/libxcrypt + Extended crypt library for descrypt, md5crypt, bcrypt, and others + libxcrypt is a modern library for one-way hashing of passwords. It +supports a wide variety of both modern and historical hashing methods: +yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, +md5crypt, SunMD5, sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt. +It provides the traditional Unix crypt and crypt_r interfaces, as well +as a set of extended interfaces pioneered by Openwall Linux, crypt_rn, +crypt_ra, crypt_gensalt, crypt_gensalt_rn, and crypt_gensalt_ra. + +libxcrypt is intended to be used by login(1), passwd(1), and other +similar programs; that is, to hash a small number of passwords during +an interactive authentication dialogue with a human. It is not suitable +for use in bulk password-cracking applications, or in any other situation +where speed is more important than careful handling of sensitive data. +However, it is intended to be fast and lightweight enough for use in +servers that must field thousands of login attempts per minute. + +This version of the library does not provide the legacy API functions +that have been provided by glibc's libcrypt.so.1. + + + libxcrypt-compat + 4.4.28 + 1.fc37 + x86_64 + https://github.com/besser82/libxcrypt + Compatibility library providing legacy API functions + This package contains the library providing the compatibility API +for applications that are linked against glibc's libxcrypt, or that +are still using the unsafe and deprecated, encrypt, encrypt_r, +setkey, setkey_r, and fcrypt functions, which are still required by +recent versions of POSIX, the Single UNIX Specification, and various +other standards. + +All existing binary executables linked against glibc's libcrypt should +work unmodified with the library supplied by this package. + + + libxkbcommon + 1.4.1 + 1.fc37 + x86_64 + http://www.x.org + X.Org X11 XKB parsing library + libxkbcommon is the X.Org library for compiling XKB maps into formats usable by +the X Server or other display servers. + + + libxml2 + 2.9.14 + 1.fc37 + x86_64 + http://xmlsoft.org/ + Library providing XML and HTML support + This library allows to manipulate XML files. It includes support +to read, modify and write XML and HTML files. There is DTDs support +this includes parsing and validation even with complex DtDs, either +at parse time or later once the document has been modified. The output +can be a simple SAX stream or and in-memory DOM like representations. +In this case one can use the built-in XPath and XPointer implementation +to select sub nodes or ranges. A flexible Input/Output mechanism is +available, with existing HTTP and FTP modules and combined to an +URI library. + + + libzstd + 1.5.2 + 2.fc37 + x86_64 + https://github.com/facebook/zstd + Zstd shared library + Zstandard compression shared library. + + + linux-firmware + 20220509 + 133.fc37 + noarch + http://www.kernel.org/ + Firmware files used by the Linux kernel + This package includes firmware files required for some devices to +operate. + + + linux-firmware-whence + 20220509 + 133.fc37 + noarch + http://www.kernel.org/ + WHENCE License file + This package contains the WHENCE license file which documents the vendor license details. + + + lua-libs + 5.4.4 + 2.fc37 + x86_64 + https://www.lua.org/ + Libraries for lua + This package contains the shared libraries for lua. + + + lz4-libs + 1.9.3 + 4.fc36 + x86_64 + https://lz4.github.io/lz4/ + Libaries for lz4 + This package contains the libaries for lz4. + + + memstrack + 0.2.4 + 2.fc36 + x86_64 + https://github.com/ryncsn/memstrack + A memory allocation tracer, like a hot spot analyzer for memory allocation + A memory allocation tracer, like a hot spot analyzer for memory allocation + + + mkpasswd + 5.5.13 + 1.fc37 + x86_64 + http://www.linux.it/~md/software/ + Encrypt a password with crypt(3) function using a salt + mkpasswd tool encrypts a given password with the crypt(3) libc function +using a given salt. + + + mpdecimal + 2.5.1 + 3.fc36 + x86_64 + http://www.bytereef.org/mpdecimal/index.html + Library for general decimal arithmetic + The package contains a library limpdec implementing General Decimal Arithmetic +Specification. The specification, written by Mike Cowlishaw from IBM, defines +a general purpose arbitrary precision data type together with rigorously +specified functions and rounding behavior. + + + mpfr + 4.1.0 + 9.fc36 + x86_64 + https://www.mpfr.org/ + C library for multiple-precision floating-point computations + The MPFR library is a C library for multiple-precision floating-point +computations with "correct rounding". The MPFR is efficient and +also has a well-defined semantics. It copies the good ideas from the +ANSI/IEEE-754 standard for double-precision floating-point arithmetic +(53-bit mantissa). MPFR is based on the GMP multiple-precision library. + + + ncurses-base + 6.3 + 2.20220501.fc37 + 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.3 + 2.20220501.fc37 + 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. + + + openldap + 2.6.2 + 1.fc37 + x86_64 + http://www.openldap.org/ + LDAP support libraries + OpenLDAP is an open source suite of LDAP (Lightweight Directory Access +Protocol) applications and development tools. LDAP is a set of +protocols for accessing directory services (usually phone book style +information, but other information is possible) over the Internet, +similar to the way DNS (Domain Name System) information is propagated +over the Internet. The openldap package contains configuration files, +libraries, and documentation for OpenLDAP. + + + openssl-libs + 1 + 3.0.2 + 4.fc37 + x86_64 + http://www.openssl.org/ + A general purpose cryptography library with TLS implementation + OpenSSL is a toolkit for supporting cryptography. The openssl-libs +package contains the libraries that are used by various applications which +support cryptographic algorithms and protocols. + + + openssl-pkcs11 + 0.4.11 + 8.fc36 + x86_64 + https://github.com/OpenSC/libp11 + A PKCS#11 engine for use with OpenSSL + openssl-pkcs11 enables hardware security module (HSM), and smart card support in +OpenSSL applications. More precisely, it is an OpenSSL engine which makes +registered PKCS#11 modules available for OpenSSL applications. The engine is +optional and can be loaded by configuration file, command line or through the +OpenSSL ENGINE API. + + + os-prober + 1.77 + 9.fc36 + x86_64 + http://kitenet.net/~joey/code/os-prober/ + Probes disks on the system for installed operating systems + This package detects other OSes available on a system and outputs the results +in a generic machine-readable format. Support for new OSes and Linux +distributions can be added easily. + + + p11-kit + 0.24.1 + 2.fc36 + x86_64 + http://p11-glue.freedesktop.org/p11-kit.html + Library for loading and sharing PKCS#11 modules + p11-kit provides a way to load and enumerate PKCS#11 modules, as well +as a standard configuration setup for installing PKCS#11 modules in +such a way that they're discoverable. + + + p11-kit-trust + 0.24.1 + 2.fc36 + x86_64 + http://p11-glue.freedesktop.org/p11-kit.html + System trust module from p11-kit + The p11-kit-trust package contains a system trust PKCS#11 module which +contains certificate anchors and black lists. + + + pam + 1.5.2 + 12.fc37 + x86_64 + http://www.linux-pam.org/ + An extensible library which provides authentication for applications + PAM (Pluggable Authentication Modules) is a system security tool that +allows system administrators to set authentication policy without +having to recompile programs that handle authentication. + + + pam-libs + 1.5.2 + 12.fc37 + x86_64 + http://www.linux-pam.org/ + Shared libraries of the PAM package + PAM (Pluggable Authentication Modules) is a system security tool that +allows system administrators to set authentication policy without +having to recompile programs that handle authentication. The pam-libs +contains the shared libraries for PAM. + + + pcre + 8.45 + 1.fc36.1 + x86_64 + https://www.pcre.org/ + Perl-compatible regular expression library + PCRE, Perl-compatible regular expression, library has its own native API, but +a set of wrapper functions that are based on the POSIX API are also supplied +in the libpcreposix library. Note that this just provides a POSIX calling +interface to PCRE: the regular expressions themselves still follow Perl syntax +and semantics. This package provides support for strings in 8-bit and UTF-8 +encodings. Detailed change log is provided by pcre-doc package. + + + pcre2 + 10.40 + 1.fc37 + x86_64 + https://www.pcre.org/ + Perl-compatible regular expression library + PCRE2 is a re-working of the original PCRE (Perl-compatible regular +expression) library to provide an entirely new API. + +PCRE2 is written in C, and it has its own API. There are three sets of +functions, one for the 8-bit library, which processes strings of bytes, one +for the 16-bit library, which processes strings of 16-bit values, and one for +the 32-bit library, which processes strings of 32-bit values. There are no C++ +wrappers. This package provides support for strings in 8-bit and UTF-8 +encodings. Install pcre2-utf16 or pcre2-utf32 packages for the other ones. + +The distribution does contain a set of C wrapper functions for the 8-bit +library that are based on the POSIX regular expression API (see the pcre2posix +man page). These can be found in a library called libpcre2posix. Note that +this just provides a POSIX calling interface to PCRE2; the regular expressions +themselves still follow Perl syntax and semantics. The POSIX API is +restricted, and does not give full access to all of PCRE2's facilities. + + + pcre2-syntax + 10.40 + 1.fc37 + noarch + https://www.pcre.org/ + Documentation for PCRE2 regular expressions + This is a set of manual pages that document a syntax of the regular +expressions implemented by the PCRE2 library. + + + pigz + 2.7 + 1.fc37 + x86_64 + https://www.zlib.net/pigz/ + Parallel implementation of gzip + pigz, which stands for parallel implementation of gzip, +is a fully functional replacement for gzip that exploits +multiple processors and multiple cores to the hilt when +compressing data. + + + popt + 1.18 + 7.fc36 + x86_64 + https://github.com/rpm-software-management/popt/ + C library for parsing command line parameters + Popt is a C library for parsing command line parameters. Popt was +heavily influenced by the getopt() and getopt_long() functions, but +it improves on them by allowing more powerful argument expansion. +Popt can parse arbitrary argv[] style arrays and automatically set +variables based on command line arguments. Popt allows command line +arguments to be aliased via configuration files and includes utility +functions for parsing arbitrary strings into argv[] arrays using +shell-like rules. + + + procps-ng + 3.3.17 + 5.fc37 + x86_64 + https://sourceforge.net/projects/procps-ng/ + System and process monitoring utilities + The procps package contains a set of system utilities that provide +system information. Procps includes ps, free, skill, pkill, pgrep, +snice, tload, top, uptime, vmstat, pidof, pmap, slabtop, w, watch, +pwdx and pidwait. +The ps command displays a snapshot of running processes. The top command +provides a repetitive update of the statuses of running processes. +The free command displays the amounts of free and used memory on your +system. The skill command sends a terminate command (or another +specified signal) to a specified set of processes. The snice +command is used to change the scheduling priority of specified +processes. The tload command prints a graph of the current system +load average to a specified tty. The uptime command displays the +current time, how long the system has been running, how many users +are logged on, and system load averages for the past one, five, +and fifteen minutes. The w command displays a list of the users +who are currently logged on and what they are running. The watch +program watches a running program. The vmstat command displays +virtual memory statistics about processes, memory, paging, block +I/O, traps, and CPU activity. The pwdx command reports the current +working directory of a process or processes. The pidwait command +waits for processes of specified names. + + + publicsuffix-list-dafsa + 20210518 + 4.fc36 + noarch + https://publicsuffix.org/ + Cross-vendor public domain suffix database in DAFSA form + The Public Suffix List is a cross-vendor initiative to provide +an accurate list of domain name suffixes, maintained by the hard work +of Mozilla volunteers and by submissions from registries. +Software using the Public Suffix List will be able to determine where +cookies may and may not be set, protecting the user from being +tracked across sites. + +This package includes a DAFSA representation of the Public Suffix List +for runtime loading. + + + python-pip-wheel + 22.0.4 + 2.fc37 + noarch + https://pip.pypa.io/ + The pip wheel + A Python wheel of pip to use with venv. + + + python-setuptools-wheel + 60.9.3 + 2.fc37 + noarch + https://pypi.python.org/pypi/setuptools + The setuptools wheel + A Python wheel of setuptools to use with venv. + + + python-unversioned-command + 3.10.4 + 1.fc37 + noarch + https://www.python.org/ + The "python" command that runs Python 3 + This package contains /usr/bin/python - the "python" command that runs Python 3. + + + python3 + 3.10.4 + 1.fc37 + x86_64 + https://www.python.org/ + Python 3.10 interpreter + Python 3.10 is an accessible, high-level, dynamically typed, interpreted +programming language, designed with an emphasis on code readability. +It includes an extensive standard library, and has a vast ecosystem of +third-party libraries. + +The python3 package provides the "python3" executable: the reference +interpreter for the Python language, version 3. +The majority of its standard library is provided in the python3-libs package, +which should be installed automatically along with python3. +The remaining parts of the Python standard library are broken out into the +python3-tkinter and python3-test packages, which may need to be installed +separately. + +Documentation for Python is provided in the python3-docs package. + +Packages containing additional libraries for Python are generally named with +the "python3-" prefix. + + + python3-libs + 3.10.4 + 1.fc37 + x86_64 + https://www.python.org/ + Python runtime libraries + This package contains runtime libraries for use by Python: +- the majority of the Python standard library +- a dynamically linked library for use by applications that embed Python as + a scripting language, and by the main "python3" executable + + + qrencode-libs + 4.1.1 + 2.fc36 + x86_64 + http://fukuchi.org/works/qrencode/ + QR Code encoding library - Shared libraries + The qrencode-libs package contains the shared libraries and header files for +applications that use qrencode. + + + readline + 8.1 + 6.fc36 + x86_64 + https://tiswww.case.edu/php/chet/readline/rltop.html + A library for editing typed command lines + The Readline library provides a set of functions that allow users to +edit command lines. Both Emacs and vi editing modes are available. The +Readline library includes additional functions for maintaining a list +of previously-entered command lines for recalling or editing those +lines, and for performing csh-like history expansion on previous +commands. + + + rpm + 4.18.0 + 0.alpha2.1.fc37 + x86_64 + http://www.rpm.org/ + The RPM package management system + The RPM Package Manager (RPM) is a powerful command line driven +package management system capable of installing, uninstalling, +verifying, querying, and updating software packages. Each software +package consists of an archive of files along with information about +the package like its version, a description, etc. + + + rpm-libs + 4.18.0 + 0.alpha2.1.fc37 + x86_64 + http://www.rpm.org/ + Libraries for manipulating RPM packages + This package contains the RPM shared libraries. + + + sed + 4.8 + 10.fc36 + x86_64 + http://sed.sourceforge.net/ + A GNU stream text editor + The sed (Stream EDitor) editor is a stream or batch (non-interactive) +editor. Sed takes text as input, performs an operation or set of +operations on the text and outputs the modified text. The operations +that sed performs (substitutions, deletions, insertions, etc.) can be +specified in a script file or from the command line. + + + setup + 2.13.10 + 1.fc37 + 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. + + + shadow-utils + 2 + 4.11.1 + 2.fc37 + x86_64 + https://github.com/shadow-maint/shadow + Utilities for managing accounts and shadow password files + The shadow-utils package includes the necessary programs for +converting UNIX password files to the shadow password format, plus +programs for managing user and group accounts. The pwconv command +converts passwords to the shadow password format. The pwunconv command +unconverts shadow passwords and generates a passwd file (a standard +UNIX password file). The pwck command checks the integrity of password +and shadow files. The lastlog command prints out the last login times +for all users. The useradd, userdel, and usermod commands are used for +managing user accounts. The groupadd, groupdel, and groupmod commands +are used for managing group accounts. + + + sqlite-libs + 3.38.5 + 1.fc37 + x86_64 + http://www.sqlite.org/ + Shared library for the sqlite3 embeddable SQL database engine. + This package contains the shared library for sqlite. + + + systemd + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + System and Service Manager + systemd is a system and service manager that runs as PID 1 and starts the rest +of the system. It provides aggressive parallelization capabilities, uses socket +and D-Bus activation for starting services, offers on-demand starting of +daemons, keeps track of processes using Linux control groups, maintains mount +and automount points, and implements an elaborate transactional dependency-based +service control logic. systemd supports SysV and LSB init scripts and works as a +replacement for sysvinit. Other parts of this package are a logging daemon, +utilities to control basic system configuration like the hostname, date, locale, +maintain a list of logged-in users, system accounts, runtime directories and +settings, and a logging daemons. + +This package was built from the 251.1-stable branch of systemd. + + + systemd-libs + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + systemd libraries + Libraries for systemd and udev. + + + systemd-networkd + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + System daemon that manages network configurations + systemd-networkd is a system service that manages networks. It detects and +configures network devices as they appear, as well as creating virtual network +devices. + + + systemd-pam + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + systemd PAM module + Systemd PAM module registers the session with systemd-logind. + + + systemd-resolved + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + Network Name Resolution manager + systemd-resolved is a system service that provides network name resolution to +local applications. It implements a caching and validating DNS/DNSSEC stub +resolver, as well as an LLMNR and MulticastDNS resolver and responder. + + + systemd-udev + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + Rule-based device node and kernel event manager + This package contains systemd-udev and the rules and hardware database needed to +manage device nodes. This package is necessary on physical machines and in +virtual machines, but not in containers. + +This package also provides systemd-timesyncd, a network time protocol daemon. + +It also contains tools to manage encrypted home areas and secrets bound to the +machine, and to create or grow partitions and make file systems automatically. + + + tpm2-tss + 3.2.0 + 1.fc37 + x86_64 + https://github.com/tpm2-software/tpm2-tss + TPM2.0 Software Stack + tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system +APIs. It sits between TPM driver and applications, providing TPM2.0 specified +APIs for applications to access TPM module through kernel TPM drivers. + + + tzdata + 2022a + 1.fc37 + noarch + https://www.iana.org/time-zones + Timezone data + This package contains data files with rules for various timezones around +the world. + + + util-linux + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Collection of basic system utilities + The util-linux package contains a large variety of low-level system +utilities that are necessary for a Linux system to function. Among +others, util-linux contains the fdisk configuration tool and the login +program. + + + util-linux-core + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + The most essential utilities from the util-linux suite + This is a very basic set of Linux utilities that is necessary on +minimal installations. + + + whois-nls + 5.5.13 + 1.fc37 + noarch + http://www.linux.it/~md/software/ + Gettext catalogs for whois tools + whois tools messages translated into different natural languages. + + + xkeyboard-config + 2.35.1 + 1.fc37 + noarch + http://www.freedesktop.org/wiki/Software/XKeyboardConfig + X Keyboard Extension configuration data + This package contains configuration data used by the X Keyboard Extension (XKB), +which allows selection of keyboard layouts when using a graphical interface. + + + xz + 5.2.5 + 9.fc37 + x86_64 + https://tukaani.org/xz/ + LZMA compression utilities + XZ Utils are an attempt to make LZMA compression easy to use on free (as in +freedom) operating systems. This is achieved by providing tools and libraries +which are similar to use than the equivalents of the most popular existing +compression algorithms. + +LZMA is a general purpose compression algorithm designed by Igor Pavlov as +part of 7-Zip. It provides high compression ratio while keeping the +decompression speed fast. + + + xz-libs + 5.2.5 + 9.fc37 + x86_64 + https://tukaani.org/xz/ + Libraries for decoding LZMA compression + Libraries for decoding files compressed with LZMA or XZ utils. + + + zlib + 1.2.11 + 31.fc36 + x86_64 + https://www.zlib.net/ + Compression and decompression library + Zlib is a general-purpose, patent-free, lossless data compression +library which is used by many different programs. diff --git a/inspector/expected-fedora-lvm-on-luks.img.xml b/inspector/expected-fedora-lvm-on-luks.img.xml index 72cddaf..f9ed235 100644 --- a/inspector/expected-fedora-lvm-on-luks.img.xml +++ b/inspector/expected-fedora-lvm-on-luks.img.xml @@ -29,10 +29,57 @@ + + alternatives + 1.19 + 2.fc36 + x86_64 + https://github.com/fedora-sysv/chkconfig + A tool to maintain symbolic links determining default commands + alternatives creates, removes, maintains and displays information about the +symbolic links comprising the alternatives system. It is possible for several +programs fulfilling the same or similar functions to be installed on a single +system at the same time. + + + audit-libs + 3.0.8 + 1.fc37 + x86_64 + http://people.redhat.com/sgrubb/audit/ + Dynamic library for libaudit + The audit-libs package contains the dynamic libraries needed for +applications to use the audit framework. + + + authselect + 1.4.0 + 1.fc37 + x86_64 + https://github.com/authselect/authselect + Configures authentication and identity sources from supported profiles + Authselect is designed to be a replacement for authconfig but it takes +a different approach to configure the system. Instead of letting +the administrator build the PAM stack with a tool (which may potentially +end up with a broken configuration), it would ship several tested stacks +(profiles) that solve a use-case and are well tested and supported. +At the same time, some obsolete features of authconfig are not +supported by authselect. + + + authselect-libs + 1.4.0 + 1.fc37 + x86_64 + https://github.com/authselect/authselect + Utility library used by the authselect tool + Common library files for authselect. This package is used by the authselect +command line tool and any other potential front-ends. + basesystem 11 - 10.fc33 + 13.fc36 noarch (none) The skeleton package which defines a simple Fedora system @@ -43,8 +90,8 @@ should never be removed. bash - 5.0.17 - 2.fc33 + 5.1.16 + 2.fc36 x86_64 https://www.gnu.org/software/bash The GNU Bourne Again shell @@ -52,11 +99,307 @@ should never be removed. 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. + + + bzip2-libs + 1.0.8 + 11.fc36 + x86_64 + http://www.bzip.org/ + Libraries for applications using bzip2 + Libraries for applications using the bzip2 compression format. + + + ca-certificates + 2021.2.52 + 3.fc36 + noarch + https://fedoraproject.org/wiki/CA-Certificates + The Mozilla CA root certificate bundle + This package contains the set of CA certificates chosen by the +Mozilla Foundation for use with the Internet PKI. + + + coreutils + 9.1 + 2.fc37 + x86_64 + https://www.gnu.org/software/coreutils/ + A set of basic GNU tools commonly used in shell scripts + These are the GNU core utilities. This package is the combination of +the old GNU fileutils, sh-utils, and textutils packages. + + + coreutils-common + 9.1 + 2.fc37 + x86_64 + https://www.gnu.org/software/coreutils/ + coreutils common optional components + Optional though recommended components, +including documentation and translations. + + + cpio + 2.13 + 12.fc36 + x86_64 + https://www.gnu.org/software/cpio/ + A GNU archiving program + GNU cpio copies files into or out of a cpio or tar archive. Archives +are files which contain a collection of other files plus information +about them, such as their file name, owner, timestamps, and access +permissions. The archive can be another file on the disk, a magnetic +tape, or a pipe. GNU cpio supports the following archive formats: binary, +old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar and POSIX.1 +tar. By default, cpio creates binary format archives, so that they are +compatible with older cpio programs. When it is extracting files from +archives, cpio automatically recognizes which kind of archive it is reading +and can read archives created on machines with a different byte-order. + +Install cpio if you need a program to manage file archives. + + + cracklib + 2.9.6 + 28.fc36 + x86_64 + http://sourceforge.net/projects/cracklib/ + A password-checking library + CrackLib tests passwords to determine whether they match certain +security-oriented characteristics, with the purpose of stopping users +from choosing passwords that are easy to guess. CrackLib performs +several tests on passwords: it tries to generate words from a username +and gecos entry and checks those words against the password; it checks +for simplistic patterns in passwords; and it checks for the password +in a dictionary. + +CrackLib is actually a library containing a particular C function +which is used to check the password, as well as other C +functions. CrackLib is not a replacement for a passwd program; it must +be used in conjunction with an existing passwd program. + +Install the cracklib package if you need a program to check users' +passwords to see if they are at least minimally secure. If you install +CrackLib, you will also want to install the cracklib-dicts package. + + + crypto-policies + 20220428 + 1.gitdfb10ea.fc37 + noarch + https://gitlab.com/redhat-crypto/fedora-crypto-policies + System-wide crypto policies + This package provides pre-built configuration files with +cryptographic policies for various cryptographic back-ends, +such as SSL/TLS libraries. + + + crypto-policies-scripts + 20220428 + 1.gitdfb10ea.fc37 + noarch + https://gitlab.com/redhat-crypto/fedora-crypto-policies + Tool to switch between crypto policies + This package provides a tool update-crypto-policies, which applies +the policies provided by the crypto-policies package. These can be +either the pre-built policies from the base package or custom policies +defined in simple policy definition files. + +The package also provides a tool fips-mode-setup, which can be used +to enable or disable the system FIPS mode. + + + cryptsetup-libs + 2.4.3 + 2.fc36 + x86_64 + https://gitlab.com/cryptsetup/cryptsetup + Cryptsetup shared library + This package contains the cryptsetup shared library, libcryptsetup. + + + curl + 7.83.1 + 1.fc37 + x86_64 + https://curl.se/ + A utility for getting files from remote servers (FTP, HTTP, and others) + curl is a command line tool for transferring data with URL syntax, supporting +FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, +SMTP, POP3 and RTSP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP +uploading, HTTP form based upload, proxies, cookies, user+password +authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer +resume, proxy tunneling and a busload of other useful tricks. + + + cyrus-sasl-lib + 2.1.28 + 1.fc37 + x86_64 + https://www.cyrusimap.org/sasl/ + Shared libraries needed by applications which use Cyrus SASL + The cyrus-sasl-lib package contains shared libraries which are needed by +applications which use the Cyrus SASL library. + + + dbus + 1 + 1.14.0 + 1.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/dbus/ + D-BUS message bus + D-BUS is a system for sending messages between applications. It is +used both for the system-wide message bus service, and as a +per-user-login-session messaging facility. + + + dbus-broker + 31 + 1.fc37 + x86_64 + https://github.com/bus1/dbus-broker + Linux D-Bus Message Broker + dbus-broker is an implementation of a message bus as defined by the D-Bus +specification. Its aim is to provide high performance and reliability, while +keeping compatibility to the D-Bus reference implementation. It is exclusively +written for Linux systems, and makes use of many modern features provided by +recent Linux kernel releases. + + + dbus-common + 1 + 1.14.0 + 1.fc37 + noarch + https://www.freedesktop.org/wiki/Software/dbus/ + D-BUS message bus configuration + The dbus-common package provides the configuration and setup files for D-Bus +implementations to provide a System and User Message Bus. + + + device-mapper + 1.02.175 + 7.fc36 + x86_64 + https://www.sourceware.org/dm/ + Device mapper utility + This package contains the supporting userspace utility, dmsetup, +for the kernel device-mapper. + + + device-mapper-libs + 1.02.175 + 7.fc36 + x86_64 + https://sourceware.org/lvm2/ + Device-mapper shared library + This package contains the device-mapper shared library, libdevmapper. + + + diffutils + 3.8 + 2.fc36 + x86_64 + https://www.gnu.org/software/diffutils/diffutils.html + GNU collection of diff utilities + Diffutils includes four utilities: diff, cmp, diff3 and sdiff. Diff +compares two files and shows the differences, line by line. The cmp +command shows the offset and line numbers where two files differ, or +cmp can show the characters that differ between the two files. The +diff3 command shows the differences between three files. Diff3 can be +used when two people have made independent changes to a common +original; diff3 can produce a merged file that contains both sets of +changes and warnings about conflicts. The sdiff command can be used +to merge two files interactively. + +Install diffutils if you need to compare text files. + + + dracut + 056 + 2.fc37 + x86_64 + https://dracut.wiki.kernel.org/ + Initramfs generator using udev + dracut contains tools to create bootable initramfses for the Linux +kernel. Unlike other implementations, dracut hard-codes as little +as possible into the initramfs. dracut contains various modules which +are driven by the event-based udev. Having root on MD, DM, LVM2, LUKS +is supported as well as NFS, iSCSI, NBD, FCoE with the dracut-network +package. + + + elfutils-debuginfod-client + 0.187 + 4.fc37 + x86_64 + http://elfutils.org/ + Library and command line client for build-id HTTP ELF/DWARF server + The elfutils-debuginfod-client package contains shared libraries +dynamically loaded from -ldw, which use a debuginfod service +to look up debuginfo and associated data. Also includes a +command-line frontend. + + + elfutils-default-yama-scope + 0.187 + 4.fc37 + noarch + http://elfutils.org/ + Default yama attach scope sysctl setting + Yama sysctl setting to enable default attach scope settings +enabling programs to use ptrace attach, access to +/proc/PID/{mem,personality,stack,syscall}, and the syscalls +process_vm_readv and process_vm_writev which are used for +interprocess services, communication and introspection +(like synchronisation, signaling, debugging, tracing and +profiling) of processes. + + + elfutils-libelf + 0.187 + 4.fc37 + x86_64 + http://elfutils.org/ + Library to read and write ELF files + The elfutils-libelf package provides a DSO which allows reading and +writing ELF files on a high level. Third party programs depend on +this package to read internals of ELF files. The programs of the +elfutils package use it also to generate new ELF files. + + + elfutils-libs + 0.187 + 4.fc37 + x86_64 + http://elfutils.org/ + Libraries to handle compiled objects + The elfutils-libs package contains libraries which implement DWARF, ELF, +and machine-specific ELF handling and process introspection. These +libraries are used by the programs in the elfutils package. The +elfutils-devel package enables building other programs using these +libraries. + + + expat + 2.4.8 + 1.fc37 + x86_64 + https://libexpat.github.io/ + An XML parser library + This is expat, the C library for parsing XML, written by James Clark. Expat +is a stream oriented XML parser. This means that you register handlers with +the parser prior to starting the parse. These handlers are called when the +parser discovers the associated structures in the document being parsed. A +start tag is an example of the kind of structures for which you may +register handlers. fedora-gpg-keys - 33 - 3 + 37 + 0.2 noarch https://fedoraproject.org/ Fedora RPM keys @@ -64,8 +407,8 @@ incorporates useful features from the Korn shell (ksh) and the C shell fedora-release - 33 - 3 + 37 + 0.5 noarch https://fedoraproject.org/ Fedora release files @@ -74,8 +417,8 @@ and systemd preset files that determine which services are enabled by default. fedora-release-common - 33 - 3 + 37 + 0.5 noarch https://fedoraproject.org/ Fedora release files @@ -83,8 +426,8 @@ and systemd preset files that determine which services are enabled by default. fedora-release-identity-basic - 33 - 3 + 37 + 0.5 noarch https://fedoraproject.org/ Package providing the basic Fedora identity @@ -93,17 +436,48 @@ itself as a particular Edition or Spin. fedora-repos - 33 - 3 + 37 + 0.2 noarch https://fedoraproject.org/ Fedora package repositories Fedora package repository files for yum and dnf along with gpg public keys. + + fedora-repos-rawhide + 37 + 0.2 + noarch + https://fedoraproject.org/ + Rawhide repo definitions + This package provides the rawhide repo definitions. + + + file + 5.41 + 5.fc37 + x86_64 + https://www.darwinsys.com/file/ + Utility for determining file types + The file command is used to identify a particular file according to the +type of data contained by the file. File can identify many different +file types, including ELF binaries, system libraries, RPM packages, and +different graphics formats. + + + file-libs + 5.41 + 5.fc37 + x86_64 + https://www.darwinsys.com/file/ + Libraries for applications using libmagic + +Libraries for applications using libmagic. + filesystem - 3.14 - 3.fc33 + 3.16 + 2.fc36 x86_64 https://pagure.io/filesystem The basic directory layout for a Linux system @@ -112,10 +486,100 @@ on a Linux system. Filesystem contains the basic directory layout for a Linux operating system, including the correct permissions for the directories. + + findutils + 1 + 4.9.0 + 1.fc36 + x86_64 + https://www.gnu.org/software/findutils/ + The GNU versions of find utilities (find and xargs) + The findutils package contains programs which will help you locate +files on your system. The find utility searches through a hierarchy +of directories looking for files which match a certain set of criteria +(such as a file name pattern). The xargs utility builds and executes +command lines from standard input arguments (usually lists of file +names generated by the find command). + +You should install findutils because it includes tools that are very +useful for finding things on your system. + + + fuse-libs + 2.9.9 + 14.fc36 + x86_64 + http://fuse.sf.net + File System in Userspace (FUSE) v2 libraries + Devel With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains the FUSE v2 libraries. + + + gawk + 5.1.1 + 3.fc37 + x86_64 + https://www.gnu.org/software/gawk/ + The GNU version of the AWK text processing utility + The gawk package contains the GNU version of AWK text processing utility. AWK is +a programming language designed for text processing and typically used as a data +extraction and reporting tool. + +The gawk utility can be used to do quick and easy text pattern matching, +extracting or reformatting. It is considered to be a standard Linux tool for +text processing. + + + gawk-all-langpacks + 5.1.1 + 3.fc37 + x86_64 + https://www.gnu.org/software/gawk/ + Additional localisation files for gawk utility + The base package of gawk supports only the english localisation. This subpackage +contains additional localisation files. + + + gdbm-libs + 1 + 1.22 + 2.fc36 + x86_64 + http://www.gnu.org/software/gdbm/ + Libraries files for gdbm + Libraries for the Gdbm GNU database indexing library + + + gettext + 0.21 + 13.fc37.0.20220203 + x86_64 + https://www.gnu.org/software/gettext/ + GNU libraries and utilities for producing multi-lingual messages + The GNU gettext package provides a set of tools and documentation for +producing multi-lingual messages in programs. Tools include a set of +conventions about how programs should be written to support message +catalogs, a directory and file naming organization for the message +catalogs, a runtime library which supports the retrieval of translated +messages, and stand-alone programs for handling the translatable and +the already translated strings. Gettext provides an easy to use +library and tools for creating, using, and modifying natural language +catalogs and is a powerful and simple method for internationalizing +programs. + + + gettext-libs + 0.21 + 13.fc37.0.20220203 + x86_64 + https://www.gnu.org/software/gettext/ + Libraries for gettext + This package contains libraries used internationalization support. + glibc - 2.32 - 4.fc33 + 2.35.9000 + 20.fc37 x86_64 http://www.gnu.org/software/glibc/ The GNU libc libraries @@ -127,115 +591,1670 @@ 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 + 2.35.9000 + 20.fc37 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. + + + glibc-gconv-extra + 2.35.9000 + 20.fc37 + x86_64 + http://www.gnu.org/software/glibc/ + All iconv converter modules for glibc. + This package contains all iconv converter modules built in glibc. + + + glibc-minimal-langpack + 2.35.9000 + 20.fc37 + x86_64 + http://www.gnu.org/software/glibc/ + Minimal language packs for glibc. + This is a Meta package that is used to install minimal language packs. +This package ensures you can use C, POSIX, or C.UTF-8 locales, but +nothing else. It is designed for assembling a minimal system. + + + gmp + 1 + 6.2.1 + 2.fc36 + x86_64 + https://gmplib.org/ + GNU arbitrary precision library + The gmp package contains GNU MP, a library for arbitrary precision +arithmetic, signed integers operations, rational numbers and floating +point numbers. GNU MP is designed for speed, for both small and very +large operands. GNU MP is fast because it uses fullwords as the basic +arithmetic type, it uses fast algorithms, it carefully optimizes +assembly code for many CPUs' most common inner loops, and it generally +emphasizes speed over simplicity/elegance in its operations. + +Install the gmp package if you need a fast arbitrary precision +library. gpg-pubkey - 9570ff31 - 5e3006fb + eb10b464 + 6202d9c6 (none) (none) - Fedora (33) <fedora-33-primary@fedoraproject.org> public key + Fedora (38) <fedora-38-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 +Version: rpm-4.17.0 (NSS-3) + +mQINBGIC2cYBEADJye1aE0AR17qwj6wsHWlCQlcihmqkL8s4gbOk1IevBbH4iXJx +lu6bN+NhTcCCX6eHmaL5Pwb/bpkMmLR+/r1D2cLDK24YzvN6kJnwRQUTf2dbqYmg +mNBgIMm+kAabBZPwUHUzyQ9CT/WJpYr1OYu8JIkdxF35nrPewnnOUUqxqbi8fXRQ +gskSLF8UveiOjFIqmWwlPwT1UtnevAaF80UGQlkwFvqjjh4b9vKY2gHMAQwt+wg5 +HFFCSwSrnd88ZoDb3pKvDMeurYUiPzF5f2r+ziVkMuaSNckvp58uge7HvyqQPAdJ +ZRswCCxhUAo9VqkNfB4Ud25ASyalk9jOE3HB8E35gFfPXvuX1n15THXNcwMEiybk +Omne2YwXL8ShGNr5otjqywThMrrqcl2g/pJVTcpDHTR5Hn9YRp+GHlYLjyEr+/x7 +xM19y9ca9GUiJqDbEREHcKKIhYiGmcIjjcJvei/3C/aM4pqeGFJBbVSnw3qeMxH/ +6ArAMA1sAdShCkv2YjlcF0r4uoCjXdS3xrKLz9PSCquot7RySnOE9TZ7flfJll7Z +q+lNaSeJg7FK8VWSUb9Lit6VEYVbzWKzespDDbujrHbFpydyq8gXurk7bSR2w0te +gsmytQqT/w1z2bydgGF6SfY9Px0wuA8GQKr48l5Bhdc6+vHHFqPKzz0PVQARAQAB +tDFGZWRvcmEgKDM4KSA8ZmVkb3JhLTM4LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v +cmc+iQJOBBMBCAA4FiEEalG7q7o9VGe2FxIhgJqNfOsQtGQFAmIC2cYCGw8FCwkI +BwIGFQoJCAsCBBYCAwECHgECF4AACgkQgJqNfOsQtGScyw/7BLmD4Fwi4QZY94zl +vlJdNufZRavOemSIVVDHoCr8pQBAdrvoMypxJd5zM4ODIqFsjdYpFti+Tkeq4/4U +25UoLPEOtU8UDt2uq7LqfdCxspaj7VyXAJIkpf7wEvLS4Jzo+YaMIlsd0dCrMXTM +vhu4gKpBFW6C+gGlmuDyTJbyrf7ilytgVzVtIfRrT7XffylviIlZHwKm43UDjvzX +YEl3EAFR1RjATwXMy2aJh7GCNsz+fKs+7YRKQUhpMF5un/2pyNJO+LbVGGwGZvga +K9Kfsg/4r1ync4nDDD1dadKIHhobDeiJ9uZLoBvvVDz7Ywu7q/vv4zIPxstYBNq4 +6fLKDtYXuJCK0EV9Qy4ox67t0UGlaRGH8y5YUqOI10xH7iQej0xWlSc8w2dKhPz8 +z9XLv2OMK+PvqvflhFHhWkqEoQRqTu0TVD0fLLe4lqieJlqZcJqW0F9G/vNSSWmf +POLa/Nim71gL2fPjCJOIRV4K/cJSyBmu5NchG7dHD5sUtJxZ4TFSuepaBZ8cPK1x +e26TaCBqoUWgUXWmw+P89aOpYOJYEFfT/VAm2Ywn+c1EFUmD+30wQ7aP/RUFl94z +n0BjqsWDnCKVFHydZ0TZSpeADmXMg2VYZPcp/cQR1KjoBoDxAscis7b1XPQUg7CB +zquq5jBVAnsNIhs7g47GWKyDUJM= +=aCLl -----END PGP PUBLIC KEY BLOCK----- - libgcc - 10.2.1 - 9.fc33 + gpg-pubkey + 5323552a + 6112bcdc + (none) + (none) + Fedora (37) <fedora-37-primary@fedoraproject.org> public key + -----BEGIN PGP PUBLIC KEY BLOCK----- +Version: rpm-4.17.0 (NSS-3) + +mQINBGESvNwBEAC7HsCDTlugVeDSMFX6aW3zAPFMfvBssNj+89fdmbxcI9t7UY6f +HvkkGziUET8e+9jB8R2/wXQCGOw1J+sfmwO4aN0LdVQjhKvVNj+F5jWt3m5FAIBa +OTWS6Kvqw2ECTpH7fD86541eK3BuCni6d5U3PCd73t976FcUmpQ/1AthqMksM0Jz +cJapvNmLTCR0NZ2XyyLmn/K1hgNXe8G5j0cSrJiY+Zpz5aQkT96j96Jm6W2A+tBI +icU4n6V4vlj2TxmCumtXJGXGBGJnof/dCgh45aqi+sk5c429ns+5sooYcaEJojj6 +FYSITv10l+az6ZMJz/j61VYSkhMY8hQ4Wd+yL2JVzLE9N9V0L95sX1yEZ5ILmzwx +oRKe4WHSBE6yMxNWobv7hmC+3ZC5mLPaEDS/g/0xuQj9Sy9eT2mhhFPxOv29YQ+P +sC3zXHJMMT0tlGd72PVHQQ0JYONfMhcC+7AHGFGz8p4/wor2jIFG1ouqE6Lfzm8o +XWZMYm3AydlrP/xkYaoWNE3jL/+dskSBr/Yz7ZzlkAqH9lb1HKnXQLTrw6gz6pmI +KufSDXjEFNxnFI/9gMlshJtk5+QSDzezmxFm+NMviSvDUNAVIzrU1D84dauBYph4 +OrJVeECQHEotny/I53AdlVwLYB4TWkObzTs6vtV7Pz1TK2CmHpe3UW72xwARAQAB +tDFGZWRvcmEgKDM3KSA8ZmVkb3JhLTM3LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v +cmc+iQJOBBMBCAA4FiEErLXuToMcdLt8Fo0n9VrT+1MjVSoFAmESvNwCGw8FCwkI +BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ9VrT+1MjVSoPMhAAist7kK/YtcyBL/dt +P55hPrkJT6Ay+e2Dvt4Pixe4iT32Y3jG12aoX2LY//mxVOOpV+EhXYTTb5aLt2Jj +a8/qCKJFk7zuCOxa1hgdRcjoR7ZbU0lNjD9mMCax/YT9QafcaMEib/FlknP3g1SN +GRSKLObTJd6BbtZXCE80JRIX+Dy6+/Oz7LXRXeKpiimhlXT1wuTaqAJEtuHdQvg7 +dkL4DzAJ2FiURVd5gvgo266WaCMafJjFRrSGHJm0c+V+0Z9NsuH80JbPm+rCUh5U +E9PMyztqlqtldtqc1+aZ1iUbVuXY059BUmlAhmf5sAlBktY+hEabH/4kmfGccbBL +TyBIn03Y9q9173okZSUe6q16m/hbbWI8dwkSpIADZbGGJbRi8PJpCg9y6KI355qD +atE2irleoy6eXqpKa+uPTRBk7i/r6jDoA+u+tZyFfcEnwvSWP8cN1j5mNklvITZl +YF1n5b3fejkZVdOmRZQNkyzMxYEd4UZFQZNYrx0nltAagRS8b5ikqNk2UTl+dyBG +k9gLOSZhAa2JdmAqwe9rT69jaa4kZMLlxPPC3246s83t0s7lp7vF+zLPfPSvxpsU +tg+fuT+OFKWYdBFF7VkEA+wezHAznIP6TPyQXbBpkzE889/hOXy4BYs0wy8Bpda/ +Ve2Ba329f99dSCZKImi5DPCxJY4= +=ZmVd +-----END PGP PUBLIC KEY BLOCK----- + + + + grep + 3.7 + 2.fc36 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. + https://www.gnu.org/software/grep/ + Pattern matching utilities + The GNU versions of commonly used grep utilities. Grep searches through +textual input for lines which contain a match to a specified pattern and then +prints the matching lines. GNU's grep utilities include grep, egrep and fgrep. + +GNU grep is needed by many scripts, so it shall be installed on every system. - ncurses-base - 6.2 - 3.20200222.fc33 + grub2-common + 1 + 2.06 + 41.fc37 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. + http://www.gnu.org/software/grub/ + grub2 common layout + This package provides some directories which are required by various grub2 +subpackages. - ncurses-libs - 6.2 - 3.20200222.fc33 + grub2-tools + 1 + 2.06 + 41.fc37 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. + http://www.gnu.org/software/grub/ + Support tools for GRUB. + +The GRand Unified Bootloader (GRUB) is a highly configurable and +customizable bootloader with modular architecture. It supports a rich +variety of kernel formats, file systems, computer architectures and +hardware devices. -This package contains the ncurses libraries. +This subpackage provides tools for support of all platforms. - 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. + grub2-tools-minimal + 1 + 2.06 + 41.fc37 + x86_64 + http://www.gnu.org/software/grub/ + Support tools for GRUB. + +The GRand Unified Bootloader (GRUB) is a highly configurable and +customizable bootloader with modular architecture. It supports a rich +variety of kernel formats, file systems, computer architectures and +hardware devices. + +This subpackage provides tools for support of all platforms. - tzdata - 2021a - 1.fc33 + grubby + 8.40 + 60.fc37 + x86_64 + (none) + Command line tool for updating bootloader configs + This package provides a grubby compatibility script that manages +BootLoaderSpec files and is meant to be backward compatible with +the previous grubby tool. + + + gzip + 1.12 + 1.fc37 + x86_64 + https://www.gzip.org/ + GNU data compression program + The gzip package contains the popular GNU gzip data compression +program. Gzipped files have a .gz extension. + +Gzip should be installed on your system, because it is a +very commonly used data compression program. + + + json-c + 0.16 + 1.fc37 + x86_64 + https://github.com/json-c/json-c + JSON implementation in C + JSON-C implements a reference counting object model that allows you +to easily construct JSON objects in C, output them as JSON formatted +strings and parse JSON formatted strings back into the C representation +of JSON objects. It aims to conform to RFC 7159. + + + kbd + 2.4.0 + 9.fc36 + x86_64 + http://www.kbd-project.org/ + Tools for configuring the console (keyboard, virtual terminals, etc.) + The kbd package contains tools for managing a Linux +system's console's behavior, including the keyboard, the screen +fonts, the virtual terminals and font files. + + + kbd-misc + 2.4.0 + 9.fc36 noarch - https://www.iana.org/time-zones - Timezone data - This package contains data files with rules for various timezones around -the world. + http://www.kbd-project.org/ + Data for kbd package + The kbd-misc package contains data for kbd package - console fonts, +keymaps etc. Please note that kbd-misc is not helpful without kbd. + + + kernel + 5.19.0 + 0.rc1.14.fc37 + x86_64 + https://www.kernel.org/ + The Linux kernel + The kernel meta package + + + kernel-core + 5.19.0 + 0.rc1.14.fc37 + x86_64 + https://www.kernel.org/ + The Linux kernel + The kernel package contains the Linux kernel (vmlinuz), the core of any +Linux operating system. The kernel handles the basic functions +of the operating system: memory allocation, process allocation, device +input and output, etc. + + + kernel-modules + 5.19.0 + 0.rc1.14.fc37 + x86_64 + https://www.kernel.org/ + kernel modules to match the core kernel + This package provides commonly used kernel modules for the core kernel package. + + + keyutils-libs + 1.6.1 + 4.fc36 + x86_64 + http://people.redhat.com/~dhowells/keyutils/ + Key utilities library + This package provides a wrapper library for the key management facility system +calls. + + + kmod + 29 + 7.fc36 + x86_64 + https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git + Linux kernel module management utilities + The kmod package provides various programs needed for automatic +loading and unloading of modules under 2.6, 3.x, and later kernels, as well +as other module management programs. Device drivers and filesystems are two +examples of loaded and unloaded modules. + + + kmod-libs + 29 + 7.fc36 + x86_64 + https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git + Libraries to handle kernel module loading and unloading + The kmod-libs package provides runtime libraries for any application that +wishes to load or unload Linux kernel modules from the running system. + + + kpartx + 0.8.9 + 1.fc37 + x86_64 + http://christophe.varoqui.free.fr/ + Partition device manager for device-mapper devices + kpartx manages partition creation and removal for device-mapper devices. + + + krb5-libs + 1.19.2 + 9.fc37 + x86_64 + https://web.mit.edu/kerberos/www/ + The non-admin shared libraries used by Kerberos 5 + Kerberos is a network authentication system. The krb5-libs package +contains the shared libraries needed by Kerberos 5. If you are using +Kerberos, you need to install this package. + + + libacl + 2.3.1 + 3.fc36 + x86_64 + https://savannah.nongnu.org/projects/acl + Dynamic library for access control list support + This package contains the libacl.so dynamic library which contains +the POSIX 1003.1e draft standard 17 functions for manipulating access +control lists. + + + libarchive + 3.6.1 + 1.fc37 + x86_64 + https://www.libarchive.org/ + A library for handling streaming archive formats + Libarchive is a programming library that can create and read several different +streaming archive formats, including most popular tar variants, several cpio +formats, and both BSD and GNU ar variants. It can also write shar archives and +read ISO9660 CDROM images and ZIP archives. + + + libargon2 + 20171227 + 9.fc37 + x86_64 + https://github.com/P-H-C/phc-winner-argon2 + The password-hashing library + Argon2 is a password-hashing function that summarizes the state of the art +in the design of memory-hard functions and can be used to hash passwords +for credential storage, key derivation, or other applications. + + + libattr + 2.5.1 + 4.fc36 + x86_64 + https://savannah.nongnu.org/projects/attr + Dynamic library for extended attribute support + This package contains the libattr.so dynamic library which contains +the extended attribute system calls and library functions. + + + libblkid + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Block device ID library + This is block device identification library, part of util-linux. + + + libbpf + 2 + 0.8.0 + 1.fc37 + x86_64 + https://github.com/libbpf/libbpf + Libbpf library + A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its +supporting header files. The version of the package reflects the version of +ABI. + + + libbrotli + 1.0.9 + 7.fc36 + x86_64 + https://github.com/google/brotli + Library for brotli lossless compression algorithm + Brotli is a generic-purpose lossless compression algorithm that compresses +data using a combination of a modern variant of the LZ77 algorithm, Huffman +coding and 2nd order context modeling, with a compression ratio comparable +to the best currently available general-purpose compression methods. +It is similar in speed with deflate but offers more dense compression. + + + libcap + 2.48 + 4.fc36 + x86_64 + https://sites.google.com/site/fullycapable/ + Library for getting and setting POSIX.1e capabilities + libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) +draft 15 capabilities. + + + libcap-ng + 0.8.3 + 1.fc37 + x86_64 + https://people.redhat.com/sgrubb/libcap-ng/ + Alternate posix capabilities library + Libcap-ng is a library that makes using posix capabilities easier + + + libcbor + 0.7.0 + 5.fc36 + x86_64 + http://libcbor.org + A CBOR parsing library + libcbor is a C library for parsing and generating CBOR. + + + libcom_err + 1.46.5 + 2.fc36 + x86_64 + http://e2fsprogs.sourceforge.net/ + Common error description library + This is the common error description library, part of e2fsprogs. + +libcom_err is an attempt to present a common error-handling mechanism. + + + libcurl + 7.83.1 + 1.fc37 + x86_64 + https://curl.se/ + A library for getting files from web servers + libcurl is a free and easy-to-use client-side URL transfer library, supporting +FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, +SMTP, POP3 and RTSP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, +FTP uploading, HTTP form based upload, proxies, cookies, user+password +authentication (Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer +resume, http proxy tunneling and more. + + + libdb + 5.3.28 + 52.fc37 + x86_64 + http://www.oracle.com/database/berkeley-db/ + The Berkeley DB database library for C + The Berkeley Database (Berkeley DB) is a programmatic toolkit that +provides embedded database support for both traditional and +client/server applications. The Berkeley DB includes B+tree, Extended +Linear Hashing, Fixed and Variable-length record access methods, +transactions, locking, logging, shared memory caching, and database +recovery. The Berkeley DB supports C, C++, and Perl APIs. It is +used by many applications, including Python and Perl, so this should +be installed on all systems. + + + libeconf + 0.4.0 + 3.fc36 + x86_64 + https://github.com/openSUSE/libeconf + Enhanced config file parser library + libeconf is a highly flexible and configurable library to parse and manage +key=value configuration files. It reads configuration file snippets from +different directories and builds the final configuration file from it. + + + libevent + 2.1.12 + 6.fc36 + x86_64 + http://libevent.org/ + Abstract asynchronous event notification library + The libevent API provides a mechanism to execute a callback function +when a specific event occurs on a file descriptor or after a timeout +has been reached. libevent is meant to replace the asynchronous event +loop found in event driven network servers. An application just needs +to call event_dispatch() and can then add or remove events dynamically +without having to change the event loop. + + + libfdisk + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Partitioning library for fdisk-like programs + This is library for fdisk-like programs, part of util-linux. + + + libffi + 3.4.2 + 8.fc36 + x86_64 + http://sourceware.org/libffi + A portable foreign function interface library + Compilers for high level languages generate code that follow certain +conventions. These conventions are necessary, in part, for separate +compilation to work. One such convention is the "calling convention". +The calling convention is a set of assumptions made by the compiler +about where function arguments will be found on entry to a function. A +calling convention also specifies where the return value for a function +is found. + +Some programs may not know at the time of compilation what arguments +are to be passed to a function. For instance, an interpreter may be +told at run-time about the number and types of arguments used to call a +given function. `Libffi' can be used in such programs to provide a +bridge from the interpreter program to compiled code. + +The `libffi' library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run time. + +FFI stands for Foreign Function Interface. A foreign function +interface is the popular name for the interface that allows code +written in one language to call code written in another language. The +`libffi' library really only provides the lowest, machine dependent +layer of a fully featured foreign function interface. A layer must +exist above `libffi' that handles type conversions for values passed +between the two languages. + + + libfido2 + 1.11.0 + 1.fc37 + x86_64 + https://github.com/Yubico/libfido2 + FIDO2 library + libfido2 is an open source library to support the FIDO2 protocol. FIDO2 is +an open authentication standard that consists of the W3C Web Authentication +specification (WebAuthn API), and the Client to Authentication Protocol +(CTAP). CTAP is an application layer protocol used for communication +between a client (browser) or a platform (operating system) with an external +authentication device (for example the Yubico Security Key). + + + libgcc + 12.1.1 + 1.fc37 + x86_64 + http://gcc.gnu.org + GCC version 12 shared support library + This package contains GCC shared support library which is needed +e.g. for exception handling support. + + + libgcrypt + 1.10.1 + 3.fc37 + x86_64 + https://www.gnupg.org/ + A general-purpose cryptography library + Libgcrypt is a general purpose crypto library based on the code used +in GNU Privacy Guard. This is a development version. + + + libgomp + 12.1.1 + 1.fc37 + x86_64 + http://gcc.gnu.org + GCC OpenMP v4.5 shared support library + This package contains GCC shared support library which is needed +for OpenMP v4.5 support. + + + libgpg-error + 1.45 + 1.fc37 + x86_64 + https://www.gnupg.org/related_software/libgpg-error/ + Library for error values used by GnuPG components + This is a library that defines common error values for all GnuPG +components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, +pinentry, SmartCard Daemon and possibly more in the future. + + + libidn2 + 2.3.2 + 4.fc36 + x86_64 + https://www.gnu.org/software/libidn/#libidn2 + Library to support IDNA2008 internationalized domain names + Libidn2 is an implementation of the IDNA2008 specifications in RFC +5890, 5891, 5892, 5893 and TR46 for internationalized domain names +(IDN). It is a standalone library, without any dependency on libidn. + + + libkcapi + 1.3.1 + 4.fc36 + x86_64 + https://www.chronox.de/libkcapi.html + User space interface to the Linux Kernel Crypto API + libkcapi allows user-space to access the Linux kernel crypto API. + +This library uses the netlink interface and exports easy to use APIs +so that a developer does not need to consider the low-level netlink +interface handling. + +The library does not implement any cipher algorithms. All consumer +requests are sent to the kernel for processing. Results from the +kernel crypto API are returned to the consumer via the library API. + +The kernel interface and therefore this library can be used by +unprivileged processes. + + + libkcapi-hmaccalc + 1.3.1 + 4.fc36 + x86_64 + https://www.chronox.de/libkcapi.html + Drop-in replacements for hmaccalc provided by the libkcapi package + Provides drop-in replacements for sha*hmac tools (from package +hmaccalc) using libkcapi. + + + libmount + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Device mounting library + This is the device mounting library, part of util-linux. + + + libnghttp2 + 1.47.0 + 1.fc37 + x86_64 + https://nghttp2.org/ + A library implementing the HTTP/2 protocol + libnghttp2 is a library implementing the Hypertext Transfer Protocol +version 2 (HTTP/2) protocol in C. + + + libnsl2 + 2.0.0 + 3.fc36 + x86_64 + https://github.com/thkukuk/libnsl + Public client interface library for NIS(YP) and NIS+ + This package contains the libnsl library. This library contains +the public client interface for NIS(YP) and NIS+. +This code was formerly part of glibc, but is now standalone to +be able to link against TI-RPC for IPv6 support. + + + libpsl + 0.21.1 + 5.fc36 + x86_64 + https://rockdaboot.github.io/libpsl + C library for the Publix Suffix List + libpsl is a C library to handle the Public Suffix List. A "public suffix" is a +domain name under which Internet users can directly register own names. + +Browsers and other web clients can use it to + +- Avoid privacy-leaking "supercookies"; +- Avoid privacy-leaking "super domain" certificates; +- Domain highlighting parts of the domain in a user interface; +- Sorting domain lists by site; + +Libpsl... + +- has built-in PSL data for fast access; +- allows to load PSL data from files; +- checks if a given domain is a "public suffix"; +- provides immediate cookie domain verification; +- finds the longest public part of a given domain; +- finds the shortest private part of a given domain; +- works with international domains (UTF-8 and IDNA2008 Punycode); +- is thread-safe; +- handles IDNA2008 UTS#46; + + + libpwquality + 1.4.4 + 7.fc36 + x86_64 + https://github.com/libpwquality/libpwquality/ + A library for password generation and password quality checking + This is a library for password quality checks and generation +of random passwords that pass the checks. +This library uses the cracklib and cracklib dictionaries +to perform some of the checks. + + + libseccomp + 2.5.3 + 2.fc36 + x86_64 + https://github.com/seccomp/libseccomp + Enhanced seccomp library + The libseccomp library provides an easy to use interface to the Linux Kernel's +syscall filtering mechanism, seccomp. The libseccomp API allows an application +to specify which syscalls, and optionally which syscall arguments, the +application is allowed to execute, all of which are enforced by the Linux +Kernel. + + + libselinux + 3.4 + 0.rc3.1.fc37 + x86_64 + https://github.com/SELinuxProject/selinux/wiki + SELinux library and simple utilities + Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libselinux provides an API for SELinux applications to get and set +process and file security contexts and to obtain security policy +decisions. Required for any applications that use the SELinux API. + + + libsemanage + 3.4 + 0.rc3.1.fc37 + x86_64 + https://github.com/SELinuxProject/selinux/wiki + SELinux binary policy manipulation library + Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libsemanage provides an API for the manipulation of SELinux binary policies. +It is used by checkpolicy (the policy compiler) and similar tools, as well +as by programs like load_policy that need to perform specific transformations +on binary policies such as customizing policy boolean settings. + + + libsepol + 3.4 + 0.rc3.1.fc37 + x86_64 + https://github.com/SELinuxProject/selinux/wiki + SELinux binary policy manipulation library + Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libsepol provides an API for the manipulation of SELinux binary policies. +It is used by checkpolicy (the policy compiler) and similar tools, as well +as by programs like load_policy that need to perform specific transformations +on binary policies such as customizing policy boolean settings. + + + libsigsegv + 2.14 + 2.fc36 + x86_64 + https://www.gnu.org/software/libsigsegv/ + Library for handling page faults in user mode + This is a library for handling page faults in user mode. A page fault +occurs when a program tries to access to a region of memory that is +currently not available. Catching and handling a page fault is a useful +technique for implementing: + - pageable virtual memory + - memory-mapped access to persistent databases + - generational garbage collectors + - stack overflow handlers + - distributed shared memory + + + libsmartcols + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Formatting library for ls-like programs + This is library for ls-like terminal programs, part of util-linux. + + + libssh + 0.9.6 + 4.fc36 + x86_64 + http://www.libssh.org + A library implementing the SSH protocol + The ssh library was designed to be used by programmers needing a working SSH +implementation by the mean of a library. The complete control of the client is +made by the programmer. With libssh, you can remotely execute programs, transfer +files, use a secure and transparent tunnel for your remote programs. With its +Secure FTP implementation, you can play with remote files easily, without +third-party programs others than libcrypto (from openssl). + + + libssh-config + 0.9.6 + 4.fc36 + noarch + http://www.libssh.org + Configuration files for libssh + The libssh-config package provides the default configuration files for libssh. + + + libstdc++ + 12.1.1 + 1.fc37 + x86_64 + http://gcc.gnu.org + GNU Standard C++ Library + The libstdc++ package contains a rewritten standard compliant GCC Standard +C++ Library. + + + libtasn1 + 4.18.0 + 2.fc36 + x86_64 + http://www.gnu.org/software/libtasn1/ + The ASN.1 library used in GNUTLS + A library that provides Abstract Syntax Notation One (ASN.1, as specified +by the X.680 ITU-T recommendation) parsing and structures management, and +Distinguished Encoding Rules (DER, as per X.690) encoding and decoding functions. + + + libtirpc + 1.3.2 + 1.rc1.fc36.1 + x86_64 + http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary + Transport Independent RPC Library + This package contains SunLib's implementation of transport-independent +RPC (TI-RPC) documentation. This library forms a piece of the base of +Open Network Computing (ONC), and is derived directly from the +Solaris 2.3 source. + +TI-RPC is an enhanced version of TS-RPC that requires the UNIX System V +Transport Layer Interface (TLI) or an equivalent X/Open Transport Interface +(XTI). TI-RPC is on-the-wire compatible with the TS-RPC, which is supported +by almost 70 vendors on all major operating systems. TS-RPC source code +(RPCSRC 4.0) remains available from several internet sites. + + + libunistring + 1.0 + 1.fc36 + x86_64 + https://www.gnu.org/software/libunistring/ + GNU Unicode string library + This portable C library implements Unicode string types in three flavours: +(UTF-8, UTF-16, UTF-32), together with functions for character processing +(names, classifications, properties) and functions for string processing +(iteration, formatted output, width, word breaks, line breaks, normalization, +case folding and regular expressions). + + + libutempter + 1.2.1 + 6.fc36 + x86_64 + ftp://ftp.altlinux.org/pub/people/ldv/utempter + A privileged helper for utmp/wtmp updates + This library provides interface for terminal emulators such as +screen and xterm to record user sessions to utmp and wtmp files. + + + libuuid + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Universally unique ID library + This is the universally unique ID library, part of util-linux. + +The libuuid library generates and parses 128-bit universally unique +id's (UUID's). A UUID is an identifier that is unique across both +space and time, with respect to the space of all UUIDs. A UUID can +be used for multiple purposes, from tagging objects with an extremely +short lifetime, to reliably identifying very persistent objects +across a network. + +See also the "uuid" package, which is a separate implementation. + + + libverto + 0.3.2 + 3.fc36 + x86_64 + https://github.com/latchset/libverto + Main loop abstraction library + libverto provides a way for libraries to expose asynchronous interfaces +without having to choose a particular event loop, offloading this +decision to the end application which consumes the library. + +If you are packaging an application, not library, based on libverto, +you should depend either on a specific implementation module or you +can depend on the virtual provides 'libverto-module-base'. This will +ensure that you have at least one module installed that provides io, +timeout and signal functionality. Currently glib is the only module +that does not provide these three because it lacks signal. However, +glib will support signal in the future. + + + libxcrypt + 4.4.28 + 1.fc37 + x86_64 + https://github.com/besser82/libxcrypt + Extended crypt library for descrypt, md5crypt, bcrypt, and others + libxcrypt is a modern library for one-way hashing of passwords. It +supports a wide variety of both modern and historical hashing methods: +yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, +md5crypt, SunMD5, sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt. +It provides the traditional Unix crypt and crypt_r interfaces, as well +as a set of extended interfaces pioneered by Openwall Linux, crypt_rn, +crypt_ra, crypt_gensalt, crypt_gensalt_rn, and crypt_gensalt_ra. + +libxcrypt is intended to be used by login(1), passwd(1), and other +similar programs; that is, to hash a small number of passwords during +an interactive authentication dialogue with a human. It is not suitable +for use in bulk password-cracking applications, or in any other situation +where speed is more important than careful handling of sensitive data. +However, it is intended to be fast and lightweight enough for use in +servers that must field thousands of login attempts per minute. + +This version of the library does not provide the legacy API functions +that have been provided by glibc's libcrypt.so.1. + + + libxcrypt-compat + 4.4.28 + 1.fc37 + x86_64 + https://github.com/besser82/libxcrypt + Compatibility library providing legacy API functions + This package contains the library providing the compatibility API +for applications that are linked against glibc's libxcrypt, or that +are still using the unsafe and deprecated, encrypt, encrypt_r, +setkey, setkey_r, and fcrypt functions, which are still required by +recent versions of POSIX, the Single UNIX Specification, and various +other standards. + +All existing binary executables linked against glibc's libcrypt should +work unmodified with the library supplied by this package. + + + libxkbcommon + 1.4.1 + 1.fc37 + x86_64 + http://www.x.org + X.Org X11 XKB parsing library + libxkbcommon is the X.Org library for compiling XKB maps into formats usable by +the X Server or other display servers. + + + libxml2 + 2.9.14 + 1.fc37 + x86_64 + http://xmlsoft.org/ + Library providing XML and HTML support + This library allows to manipulate XML files. It includes support +to read, modify and write XML and HTML files. There is DTDs support +this includes parsing and validation even with complex DtDs, either +at parse time or later once the document has been modified. The output +can be a simple SAX stream or and in-memory DOM like representations. +In this case one can use the built-in XPath and XPointer implementation +to select sub nodes or ranges. A flexible Input/Output mechanism is +available, with existing HTTP and FTP modules and combined to an +URI library. + + + libzstd + 1.5.2 + 2.fc37 + x86_64 + https://github.com/facebook/zstd + Zstd shared library + Zstandard compression shared library. + + + linux-firmware + 20220509 + 133.fc37 + noarch + http://www.kernel.org/ + Firmware files used by the Linux kernel + This package includes firmware files required for some devices to +operate. + + + linux-firmware-whence + 20220509 + 133.fc37 + noarch + http://www.kernel.org/ + WHENCE License file + This package contains the WHENCE license file which documents the vendor license details. + + + lua-libs + 5.4.4 + 2.fc37 + x86_64 + https://www.lua.org/ + Libraries for lua + This package contains the shared libraries for lua. + + + lz4-libs + 1.9.3 + 4.fc36 + x86_64 + https://lz4.github.io/lz4/ + Libaries for lz4 + This package contains the libaries for lz4. + + + memstrack + 0.2.4 + 2.fc36 + x86_64 + https://github.com/ryncsn/memstrack + A memory allocation tracer, like a hot spot analyzer for memory allocation + A memory allocation tracer, like a hot spot analyzer for memory allocation + + + mkpasswd + 5.5.13 + 1.fc37 + x86_64 + http://www.linux.it/~md/software/ + Encrypt a password with crypt(3) function using a salt + mkpasswd tool encrypts a given password with the crypt(3) libc function +using a given salt. + + + mpdecimal + 2.5.1 + 3.fc36 + x86_64 + http://www.bytereef.org/mpdecimal/index.html + Library for general decimal arithmetic + The package contains a library limpdec implementing General Decimal Arithmetic +Specification. The specification, written by Mike Cowlishaw from IBM, defines +a general purpose arbitrary precision data type together with rigorously +specified functions and rounding behavior. + + + mpfr + 4.1.0 + 9.fc36 + x86_64 + https://www.mpfr.org/ + C library for multiple-precision floating-point computations + The MPFR library is a C library for multiple-precision floating-point +computations with "correct rounding". The MPFR is efficient and +also has a well-defined semantics. It copies the good ideas from the +ANSI/IEEE-754 standard for double-precision floating-point arithmetic +(53-bit mantissa). MPFR is based on the GMP multiple-precision library. + + + ncurses-base + 6.3 + 2.20220501.fc37 + 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.3 + 2.20220501.fc37 + 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. + + + openldap + 2.6.2 + 1.fc37 + x86_64 + http://www.openldap.org/ + LDAP support libraries + OpenLDAP is an open source suite of LDAP (Lightweight Directory Access +Protocol) applications and development tools. LDAP is a set of +protocols for accessing directory services (usually phone book style +information, but other information is possible) over the Internet, +similar to the way DNS (Domain Name System) information is propagated +over the Internet. The openldap package contains configuration files, +libraries, and documentation for OpenLDAP. + + + openssl-libs + 1 + 3.0.2 + 4.fc37 + x86_64 + http://www.openssl.org/ + A general purpose cryptography library with TLS implementation + OpenSSL is a toolkit for supporting cryptography. The openssl-libs +package contains the libraries that are used by various applications which +support cryptographic algorithms and protocols. + + + openssl-pkcs11 + 0.4.11 + 8.fc36 + x86_64 + https://github.com/OpenSC/libp11 + A PKCS#11 engine for use with OpenSSL + openssl-pkcs11 enables hardware security module (HSM), and smart card support in +OpenSSL applications. More precisely, it is an OpenSSL engine which makes +registered PKCS#11 modules available for OpenSSL applications. The engine is +optional and can be loaded by configuration file, command line or through the +OpenSSL ENGINE API. + + + os-prober + 1.77 + 9.fc36 + x86_64 + http://kitenet.net/~joey/code/os-prober/ + Probes disks on the system for installed operating systems + This package detects other OSes available on a system and outputs the results +in a generic machine-readable format. Support for new OSes and Linux +distributions can be added easily. + + + p11-kit + 0.24.1 + 2.fc36 + x86_64 + http://p11-glue.freedesktop.org/p11-kit.html + Library for loading and sharing PKCS#11 modules + p11-kit provides a way to load and enumerate PKCS#11 modules, as well +as a standard configuration setup for installing PKCS#11 modules in +such a way that they're discoverable. + + + p11-kit-trust + 0.24.1 + 2.fc36 + x86_64 + http://p11-glue.freedesktop.org/p11-kit.html + System trust module from p11-kit + The p11-kit-trust package contains a system trust PKCS#11 module which +contains certificate anchors and black lists. + + + pam + 1.5.2 + 12.fc37 + x86_64 + http://www.linux-pam.org/ + An extensible library which provides authentication for applications + PAM (Pluggable Authentication Modules) is a system security tool that +allows system administrators to set authentication policy without +having to recompile programs that handle authentication. + + + pam-libs + 1.5.2 + 12.fc37 + x86_64 + http://www.linux-pam.org/ + Shared libraries of the PAM package + PAM (Pluggable Authentication Modules) is a system security tool that +allows system administrators to set authentication policy without +having to recompile programs that handle authentication. The pam-libs +contains the shared libraries for PAM. + + + pcre + 8.45 + 1.fc36.1 + x86_64 + https://www.pcre.org/ + Perl-compatible regular expression library + PCRE, Perl-compatible regular expression, library has its own native API, but +a set of wrapper functions that are based on the POSIX API are also supplied +in the libpcreposix library. Note that this just provides a POSIX calling +interface to PCRE: the regular expressions themselves still follow Perl syntax +and semantics. This package provides support for strings in 8-bit and UTF-8 +encodings. Detailed change log is provided by pcre-doc package. + + + pcre2 + 10.40 + 1.fc37 + x86_64 + https://www.pcre.org/ + Perl-compatible regular expression library + PCRE2 is a re-working of the original PCRE (Perl-compatible regular +expression) library to provide an entirely new API. + +PCRE2 is written in C, and it has its own API. There are three sets of +functions, one for the 8-bit library, which processes strings of bytes, one +for the 16-bit library, which processes strings of 16-bit values, and one for +the 32-bit library, which processes strings of 32-bit values. There are no C++ +wrappers. This package provides support for strings in 8-bit and UTF-8 +encodings. Install pcre2-utf16 or pcre2-utf32 packages for the other ones. + +The distribution does contain a set of C wrapper functions for the 8-bit +library that are based on the POSIX regular expression API (see the pcre2posix +man page). These can be found in a library called libpcre2posix. Note that +this just provides a POSIX calling interface to PCRE2; the regular expressions +themselves still follow Perl syntax and semantics. The POSIX API is +restricted, and does not give full access to all of PCRE2's facilities. + + + pcre2-syntax + 10.40 + 1.fc37 + noarch + https://www.pcre.org/ + Documentation for PCRE2 regular expressions + This is a set of manual pages that document a syntax of the regular +expressions implemented by the PCRE2 library. + + + pigz + 2.7 + 1.fc37 + x86_64 + https://www.zlib.net/pigz/ + Parallel implementation of gzip + pigz, which stands for parallel implementation of gzip, +is a fully functional replacement for gzip that exploits +multiple processors and multiple cores to the hilt when +compressing data. + + + popt + 1.18 + 7.fc36 + x86_64 + https://github.com/rpm-software-management/popt/ + C library for parsing command line parameters + Popt is a C library for parsing command line parameters. Popt was +heavily influenced by the getopt() and getopt_long() functions, but +it improves on them by allowing more powerful argument expansion. +Popt can parse arbitrary argv[] style arrays and automatically set +variables based on command line arguments. Popt allows command line +arguments to be aliased via configuration files and includes utility +functions for parsing arbitrary strings into argv[] arrays using +shell-like rules. + + + procps-ng + 3.3.17 + 5.fc37 + x86_64 + https://sourceforge.net/projects/procps-ng/ + System and process monitoring utilities + The procps package contains a set of system utilities that provide +system information. Procps includes ps, free, skill, pkill, pgrep, +snice, tload, top, uptime, vmstat, pidof, pmap, slabtop, w, watch, +pwdx and pidwait. +The ps command displays a snapshot of running processes. The top command +provides a repetitive update of the statuses of running processes. +The free command displays the amounts of free and used memory on your +system. The skill command sends a terminate command (or another +specified signal) to a specified set of processes. The snice +command is used to change the scheduling priority of specified +processes. The tload command prints a graph of the current system +load average to a specified tty. The uptime command displays the +current time, how long the system has been running, how many users +are logged on, and system load averages for the past one, five, +and fifteen minutes. The w command displays a list of the users +who are currently logged on and what they are running. The watch +program watches a running program. The vmstat command displays +virtual memory statistics about processes, memory, paging, block +I/O, traps, and CPU activity. The pwdx command reports the current +working directory of a process or processes. The pidwait command +waits for processes of specified names. + + + publicsuffix-list-dafsa + 20210518 + 4.fc36 + noarch + https://publicsuffix.org/ + Cross-vendor public domain suffix database in DAFSA form + The Public Suffix List is a cross-vendor initiative to provide +an accurate list of domain name suffixes, maintained by the hard work +of Mozilla volunteers and by submissions from registries. +Software using the Public Suffix List will be able to determine where +cookies may and may not be set, protecting the user from being +tracked across sites. + +This package includes a DAFSA representation of the Public Suffix List +for runtime loading. + + + python-pip-wheel + 22.0.4 + 2.fc37 + noarch + https://pip.pypa.io/ + The pip wheel + A Python wheel of pip to use with venv. + + + python-setuptools-wheel + 60.9.3 + 2.fc37 + noarch + https://pypi.python.org/pypi/setuptools + The setuptools wheel + A Python wheel of setuptools to use with venv. + + + python-unversioned-command + 3.10.4 + 1.fc37 + noarch + https://www.python.org/ + The "python" command that runs Python 3 + This package contains /usr/bin/python - the "python" command that runs Python 3. + + + python3 + 3.10.4 + 1.fc37 + x86_64 + https://www.python.org/ + Python 3.10 interpreter + Python 3.10 is an accessible, high-level, dynamically typed, interpreted +programming language, designed with an emphasis on code readability. +It includes an extensive standard library, and has a vast ecosystem of +third-party libraries. + +The python3 package provides the "python3" executable: the reference +interpreter for the Python language, version 3. +The majority of its standard library is provided in the python3-libs package, +which should be installed automatically along with python3. +The remaining parts of the Python standard library are broken out into the +python3-tkinter and python3-test packages, which may need to be installed +separately. + +Documentation for Python is provided in the python3-docs package. + +Packages containing additional libraries for Python are generally named with +the "python3-" prefix. + + + python3-libs + 3.10.4 + 1.fc37 + x86_64 + https://www.python.org/ + Python runtime libraries + This package contains runtime libraries for use by Python: +- the majority of the Python standard library +- a dynamically linked library for use by applications that embed Python as + a scripting language, and by the main "python3" executable + + + qrencode-libs + 4.1.1 + 2.fc36 + x86_64 + http://fukuchi.org/works/qrencode/ + QR Code encoding library - Shared libraries + The qrencode-libs package contains the shared libraries and header files for +applications that use qrencode. + + + readline + 8.1 + 6.fc36 + x86_64 + https://tiswww.case.edu/php/chet/readline/rltop.html + A library for editing typed command lines + The Readline library provides a set of functions that allow users to +edit command lines. Both Emacs and vi editing modes are available. The +Readline library includes additional functions for maintaining a list +of previously-entered command lines for recalling or editing those +lines, and for performing csh-like history expansion on previous +commands. + + + rpm + 4.18.0 + 0.alpha2.1.fc37 + x86_64 + http://www.rpm.org/ + The RPM package management system + The RPM Package Manager (RPM) is a powerful command line driven +package management system capable of installing, uninstalling, +verifying, querying, and updating software packages. Each software +package consists of an archive of files along with information about +the package like its version, a description, etc. + + + rpm-libs + 4.18.0 + 0.alpha2.1.fc37 + x86_64 + http://www.rpm.org/ + Libraries for manipulating RPM packages + This package contains the RPM shared libraries. + + + sed + 4.8 + 10.fc36 + x86_64 + http://sed.sourceforge.net/ + A GNU stream text editor + The sed (Stream EDitor) editor is a stream or batch (non-interactive) +editor. Sed takes text as input, performs an operation or set of +operations on the text and outputs the modified text. The operations +that sed performs (substitutions, deletions, insertions, etc.) can be +specified in a script file or from the command line. + + + setup + 2.13.10 + 1.fc37 + 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. + + + shadow-utils + 2 + 4.11.1 + 2.fc37 + x86_64 + https://github.com/shadow-maint/shadow + Utilities for managing accounts and shadow password files + The shadow-utils package includes the necessary programs for +converting UNIX password files to the shadow password format, plus +programs for managing user and group accounts. The pwconv command +converts passwords to the shadow password format. The pwunconv command +unconverts shadow passwords and generates a passwd file (a standard +UNIX password file). The pwck command checks the integrity of password +and shadow files. The lastlog command prints out the last login times +for all users. The useradd, userdel, and usermod commands are used for +managing user accounts. The groupadd, groupdel, and groupmod commands +are used for managing group accounts. + + + sqlite-libs + 3.38.5 + 1.fc37 + x86_64 + http://www.sqlite.org/ + Shared library for the sqlite3 embeddable SQL database engine. + This package contains the shared library for sqlite. + + + systemd + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + System and Service Manager + systemd is a system and service manager that runs as PID 1 and starts the rest +of the system. It provides aggressive parallelization capabilities, uses socket +and D-Bus activation for starting services, offers on-demand starting of +daemons, keeps track of processes using Linux control groups, maintains mount +and automount points, and implements an elaborate transactional dependency-based +service control logic. systemd supports SysV and LSB init scripts and works as a +replacement for sysvinit. Other parts of this package are a logging daemon, +utilities to control basic system configuration like the hostname, date, locale, +maintain a list of logged-in users, system accounts, runtime directories and +settings, and a logging daemons. + +This package was built from the 251.1-stable branch of systemd. + + + systemd-libs + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + systemd libraries + Libraries for systemd and udev. + + + systemd-networkd + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + System daemon that manages network configurations + systemd-networkd is a system service that manages networks. It detects and +configures network devices as they appear, as well as creating virtual network +devices. + + + systemd-pam + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + systemd PAM module + Systemd PAM module registers the session with systemd-logind. + + + systemd-resolved + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + Network Name Resolution manager + systemd-resolved is a system service that provides network name resolution to +local applications. It implements a caching and validating DNS/DNSSEC stub +resolver, as well as an LLMNR and MulticastDNS resolver and responder. + + + systemd-udev + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + Rule-based device node and kernel event manager + This package contains systemd-udev and the rules and hardware database needed to +manage device nodes. This package is necessary on physical machines and in +virtual machines, but not in containers. + +This package also provides systemd-timesyncd, a network time protocol daemon. + +It also contains tools to manage encrypted home areas and secrets bound to the +machine, and to create or grow partitions and make file systems automatically. + + + tpm2-tss + 3.2.0 + 1.fc37 + x86_64 + https://github.com/tpm2-software/tpm2-tss + TPM2.0 Software Stack + tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system +APIs. It sits between TPM driver and applications, providing TPM2.0 specified +APIs for applications to access TPM module through kernel TPM drivers. + + + tzdata + 2022a + 1.fc37 + noarch + https://www.iana.org/time-zones + Timezone data + This package contains data files with rules for various timezones around +the world. + + + util-linux + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Collection of basic system utilities + The util-linux package contains a large variety of low-level system +utilities that are necessary for a Linux system to function. Among +others, util-linux contains the fdisk configuration tool and the login +program. + + + util-linux-core + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + The most essential utilities from the util-linux suite + This is a very basic set of Linux utilities that is necessary on +minimal installations. + + + whois-nls + 5.5.13 + 1.fc37 + noarch + http://www.linux.it/~md/software/ + Gettext catalogs for whois tools + whois tools messages translated into different natural languages. + + + xkeyboard-config + 2.35.1 + 1.fc37 + noarch + http://www.freedesktop.org/wiki/Software/XKeyboardConfig + X Keyboard Extension configuration data + This package contains configuration data used by the X Keyboard Extension (XKB), +which allows selection of keyboard layouts when using a graphical interface. + + + xz + 5.2.5 + 9.fc37 + x86_64 + https://tukaani.org/xz/ + LZMA compression utilities + XZ Utils are an attempt to make LZMA compression easy to use on free (as in +freedom) operating systems. This is achieved by providing tools and libraries +which are similar to use than the equivalents of the most popular existing +compression algorithms. + +LZMA is a general purpose compression algorithm designed by Igor Pavlov as +part of 7-Zip. It provides high compression ratio while keeping the +decompression speed fast. + + + xz-libs + 5.2.5 + 9.fc37 + x86_64 + https://tukaani.org/xz/ + Libraries for decoding LZMA compression + Libraries for decoding files compressed with LZMA or XZ utils. + + + zlib + 1.2.11 + 31.fc36 + x86_64 + https://www.zlib.net/ + Compression and decompression library + Zlib is a general-purpose, patent-free, lossless data compression +library which is used by many different programs. diff --git a/inspector/expected-fedora.img.xml b/inspector/expected-fedora.img.xml index 72cddaf..f9ed235 100644 --- a/inspector/expected-fedora.img.xml +++ b/inspector/expected-fedora.img.xml @@ -29,10 +29,57 @@ + + alternatives + 1.19 + 2.fc36 + x86_64 + https://github.com/fedora-sysv/chkconfig + A tool to maintain symbolic links determining default commands + alternatives creates, removes, maintains and displays information about the +symbolic links comprising the alternatives system. It is possible for several +programs fulfilling the same or similar functions to be installed on a single +system at the same time. + + + audit-libs + 3.0.8 + 1.fc37 + x86_64 + http://people.redhat.com/sgrubb/audit/ + Dynamic library for libaudit + The audit-libs package contains the dynamic libraries needed for +applications to use the audit framework. + + + authselect + 1.4.0 + 1.fc37 + x86_64 + https://github.com/authselect/authselect + Configures authentication and identity sources from supported profiles + Authselect is designed to be a replacement for authconfig but it takes +a different approach to configure the system. Instead of letting +the administrator build the PAM stack with a tool (which may potentially +end up with a broken configuration), it would ship several tested stacks +(profiles) that solve a use-case and are well tested and supported. +At the same time, some obsolete features of authconfig are not +supported by authselect. + + + authselect-libs + 1.4.0 + 1.fc37 + x86_64 + https://github.com/authselect/authselect + Utility library used by the authselect tool + Common library files for authselect. This package is used by the authselect +command line tool and any other potential front-ends. + basesystem 11 - 10.fc33 + 13.fc36 noarch (none) The skeleton package which defines a simple Fedora system @@ -43,8 +90,8 @@ should never be removed. bash - 5.0.17 - 2.fc33 + 5.1.16 + 2.fc36 x86_64 https://www.gnu.org/software/bash The GNU Bourne Again shell @@ -52,11 +99,307 @@ should never be removed. 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. + + + bzip2-libs + 1.0.8 + 11.fc36 + x86_64 + http://www.bzip.org/ + Libraries for applications using bzip2 + Libraries for applications using the bzip2 compression format. + + + ca-certificates + 2021.2.52 + 3.fc36 + noarch + https://fedoraproject.org/wiki/CA-Certificates + The Mozilla CA root certificate bundle + This package contains the set of CA certificates chosen by the +Mozilla Foundation for use with the Internet PKI. + + + coreutils + 9.1 + 2.fc37 + x86_64 + https://www.gnu.org/software/coreutils/ + A set of basic GNU tools commonly used in shell scripts + These are the GNU core utilities. This package is the combination of +the old GNU fileutils, sh-utils, and textutils packages. + + + coreutils-common + 9.1 + 2.fc37 + x86_64 + https://www.gnu.org/software/coreutils/ + coreutils common optional components + Optional though recommended components, +including documentation and translations. + + + cpio + 2.13 + 12.fc36 + x86_64 + https://www.gnu.org/software/cpio/ + A GNU archiving program + GNU cpio copies files into or out of a cpio or tar archive. Archives +are files which contain a collection of other files plus information +about them, such as their file name, owner, timestamps, and access +permissions. The archive can be another file on the disk, a magnetic +tape, or a pipe. GNU cpio supports the following archive formats: binary, +old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar and POSIX.1 +tar. By default, cpio creates binary format archives, so that they are +compatible with older cpio programs. When it is extracting files from +archives, cpio automatically recognizes which kind of archive it is reading +and can read archives created on machines with a different byte-order. + +Install cpio if you need a program to manage file archives. + + + cracklib + 2.9.6 + 28.fc36 + x86_64 + http://sourceforge.net/projects/cracklib/ + A password-checking library + CrackLib tests passwords to determine whether they match certain +security-oriented characteristics, with the purpose of stopping users +from choosing passwords that are easy to guess. CrackLib performs +several tests on passwords: it tries to generate words from a username +and gecos entry and checks those words against the password; it checks +for simplistic patterns in passwords; and it checks for the password +in a dictionary. + +CrackLib is actually a library containing a particular C function +which is used to check the password, as well as other C +functions. CrackLib is not a replacement for a passwd program; it must +be used in conjunction with an existing passwd program. + +Install the cracklib package if you need a program to check users' +passwords to see if they are at least minimally secure. If you install +CrackLib, you will also want to install the cracklib-dicts package. + + + crypto-policies + 20220428 + 1.gitdfb10ea.fc37 + noarch + https://gitlab.com/redhat-crypto/fedora-crypto-policies + System-wide crypto policies + This package provides pre-built configuration files with +cryptographic policies for various cryptographic back-ends, +such as SSL/TLS libraries. + + + crypto-policies-scripts + 20220428 + 1.gitdfb10ea.fc37 + noarch + https://gitlab.com/redhat-crypto/fedora-crypto-policies + Tool to switch between crypto policies + This package provides a tool update-crypto-policies, which applies +the policies provided by the crypto-policies package. These can be +either the pre-built policies from the base package or custom policies +defined in simple policy definition files. + +The package also provides a tool fips-mode-setup, which can be used +to enable or disable the system FIPS mode. + + + cryptsetup-libs + 2.4.3 + 2.fc36 + x86_64 + https://gitlab.com/cryptsetup/cryptsetup + Cryptsetup shared library + This package contains the cryptsetup shared library, libcryptsetup. + + + curl + 7.83.1 + 1.fc37 + x86_64 + https://curl.se/ + A utility for getting files from remote servers (FTP, HTTP, and others) + curl is a command line tool for transferring data with URL syntax, supporting +FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, +SMTP, POP3 and RTSP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP +uploading, HTTP form based upload, proxies, cookies, user+password +authentication (Basic, Digest, NTLM, Negotiate, kerberos...), file transfer +resume, proxy tunneling and a busload of other useful tricks. + + + cyrus-sasl-lib + 2.1.28 + 1.fc37 + x86_64 + https://www.cyrusimap.org/sasl/ + Shared libraries needed by applications which use Cyrus SASL + The cyrus-sasl-lib package contains shared libraries which are needed by +applications which use the Cyrus SASL library. + + + dbus + 1 + 1.14.0 + 1.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/dbus/ + D-BUS message bus + D-BUS is a system for sending messages between applications. It is +used both for the system-wide message bus service, and as a +per-user-login-session messaging facility. + + + dbus-broker + 31 + 1.fc37 + x86_64 + https://github.com/bus1/dbus-broker + Linux D-Bus Message Broker + dbus-broker is an implementation of a message bus as defined by the D-Bus +specification. Its aim is to provide high performance and reliability, while +keeping compatibility to the D-Bus reference implementation. It is exclusively +written for Linux systems, and makes use of many modern features provided by +recent Linux kernel releases. + + + dbus-common + 1 + 1.14.0 + 1.fc37 + noarch + https://www.freedesktop.org/wiki/Software/dbus/ + D-BUS message bus configuration + The dbus-common package provides the configuration and setup files for D-Bus +implementations to provide a System and User Message Bus. + + + device-mapper + 1.02.175 + 7.fc36 + x86_64 + https://www.sourceware.org/dm/ + Device mapper utility + This package contains the supporting userspace utility, dmsetup, +for the kernel device-mapper. + + + device-mapper-libs + 1.02.175 + 7.fc36 + x86_64 + https://sourceware.org/lvm2/ + Device-mapper shared library + This package contains the device-mapper shared library, libdevmapper. + + + diffutils + 3.8 + 2.fc36 + x86_64 + https://www.gnu.org/software/diffutils/diffutils.html + GNU collection of diff utilities + Diffutils includes four utilities: diff, cmp, diff3 and sdiff. Diff +compares two files and shows the differences, line by line. The cmp +command shows the offset and line numbers where two files differ, or +cmp can show the characters that differ between the two files. The +diff3 command shows the differences between three files. Diff3 can be +used when two people have made independent changes to a common +original; diff3 can produce a merged file that contains both sets of +changes and warnings about conflicts. The sdiff command can be used +to merge two files interactively. + +Install diffutils if you need to compare text files. + + + dracut + 056 + 2.fc37 + x86_64 + https://dracut.wiki.kernel.org/ + Initramfs generator using udev + dracut contains tools to create bootable initramfses for the Linux +kernel. Unlike other implementations, dracut hard-codes as little +as possible into the initramfs. dracut contains various modules which +are driven by the event-based udev. Having root on MD, DM, LVM2, LUKS +is supported as well as NFS, iSCSI, NBD, FCoE with the dracut-network +package. + + + elfutils-debuginfod-client + 0.187 + 4.fc37 + x86_64 + http://elfutils.org/ + Library and command line client for build-id HTTP ELF/DWARF server + The elfutils-debuginfod-client package contains shared libraries +dynamically loaded from -ldw, which use a debuginfod service +to look up debuginfo and associated data. Also includes a +command-line frontend. + + + elfutils-default-yama-scope + 0.187 + 4.fc37 + noarch + http://elfutils.org/ + Default yama attach scope sysctl setting + Yama sysctl setting to enable default attach scope settings +enabling programs to use ptrace attach, access to +/proc/PID/{mem,personality,stack,syscall}, and the syscalls +process_vm_readv and process_vm_writev which are used for +interprocess services, communication and introspection +(like synchronisation, signaling, debugging, tracing and +profiling) of processes. + + + elfutils-libelf + 0.187 + 4.fc37 + x86_64 + http://elfutils.org/ + Library to read and write ELF files + The elfutils-libelf package provides a DSO which allows reading and +writing ELF files on a high level. Third party programs depend on +this package to read internals of ELF files. The programs of the +elfutils package use it also to generate new ELF files. + + + elfutils-libs + 0.187 + 4.fc37 + x86_64 + http://elfutils.org/ + Libraries to handle compiled objects + The elfutils-libs package contains libraries which implement DWARF, ELF, +and machine-specific ELF handling and process introspection. These +libraries are used by the programs in the elfutils package. The +elfutils-devel package enables building other programs using these +libraries. + + + expat + 2.4.8 + 1.fc37 + x86_64 + https://libexpat.github.io/ + An XML parser library + This is expat, the C library for parsing XML, written by James Clark. Expat +is a stream oriented XML parser. This means that you register handlers with +the parser prior to starting the parse. These handlers are called when the +parser discovers the associated structures in the document being parsed. A +start tag is an example of the kind of structures for which you may +register handlers. fedora-gpg-keys - 33 - 3 + 37 + 0.2 noarch https://fedoraproject.org/ Fedora RPM keys @@ -64,8 +407,8 @@ incorporates useful features from the Korn shell (ksh) and the C shell fedora-release - 33 - 3 + 37 + 0.5 noarch https://fedoraproject.org/ Fedora release files @@ -74,8 +417,8 @@ and systemd preset files that determine which services are enabled by default. fedora-release-common - 33 - 3 + 37 + 0.5 noarch https://fedoraproject.org/ Fedora release files @@ -83,8 +426,8 @@ and systemd preset files that determine which services are enabled by default. fedora-release-identity-basic - 33 - 3 + 37 + 0.5 noarch https://fedoraproject.org/ Package providing the basic Fedora identity @@ -93,17 +436,48 @@ itself as a particular Edition or Spin. fedora-repos - 33 - 3 + 37 + 0.2 noarch https://fedoraproject.org/ Fedora package repositories Fedora package repository files for yum and dnf along with gpg public keys. + + fedora-repos-rawhide + 37 + 0.2 + noarch + https://fedoraproject.org/ + Rawhide repo definitions + This package provides the rawhide repo definitions. + + + file + 5.41 + 5.fc37 + x86_64 + https://www.darwinsys.com/file/ + Utility for determining file types + The file command is used to identify a particular file according to the +type of data contained by the file. File can identify many different +file types, including ELF binaries, system libraries, RPM packages, and +different graphics formats. + + + file-libs + 5.41 + 5.fc37 + x86_64 + https://www.darwinsys.com/file/ + Libraries for applications using libmagic + +Libraries for applications using libmagic. + filesystem - 3.14 - 3.fc33 + 3.16 + 2.fc36 x86_64 https://pagure.io/filesystem The basic directory layout for a Linux system @@ -112,10 +486,100 @@ on a Linux system. Filesystem contains the basic directory layout for a Linux operating system, including the correct permissions for the directories. + + findutils + 1 + 4.9.0 + 1.fc36 + x86_64 + https://www.gnu.org/software/findutils/ + The GNU versions of find utilities (find and xargs) + The findutils package contains programs which will help you locate +files on your system. The find utility searches through a hierarchy +of directories looking for files which match a certain set of criteria +(such as a file name pattern). The xargs utility builds and executes +command lines from standard input arguments (usually lists of file +names generated by the find command). + +You should install findutils because it includes tools that are very +useful for finding things on your system. + + + fuse-libs + 2.9.9 + 14.fc36 + x86_64 + http://fuse.sf.net + File System in Userspace (FUSE) v2 libraries + Devel With FUSE it is possible to implement a fully functional filesystem in a +userspace program. This package contains the FUSE v2 libraries. + + + gawk + 5.1.1 + 3.fc37 + x86_64 + https://www.gnu.org/software/gawk/ + The GNU version of the AWK text processing utility + The gawk package contains the GNU version of AWK text processing utility. AWK is +a programming language designed for text processing and typically used as a data +extraction and reporting tool. + +The gawk utility can be used to do quick and easy text pattern matching, +extracting or reformatting. It is considered to be a standard Linux tool for +text processing. + + + gawk-all-langpacks + 5.1.1 + 3.fc37 + x86_64 + https://www.gnu.org/software/gawk/ + Additional localisation files for gawk utility + The base package of gawk supports only the english localisation. This subpackage +contains additional localisation files. + + + gdbm-libs + 1 + 1.22 + 2.fc36 + x86_64 + http://www.gnu.org/software/gdbm/ + Libraries files for gdbm + Libraries for the Gdbm GNU database indexing library + + + gettext + 0.21 + 13.fc37.0.20220203 + x86_64 + https://www.gnu.org/software/gettext/ + GNU libraries and utilities for producing multi-lingual messages + The GNU gettext package provides a set of tools and documentation for +producing multi-lingual messages in programs. Tools include a set of +conventions about how programs should be written to support message +catalogs, a directory and file naming organization for the message +catalogs, a runtime library which supports the retrieval of translated +messages, and stand-alone programs for handling the translatable and +the already translated strings. Gettext provides an easy to use +library and tools for creating, using, and modifying natural language +catalogs and is a powerful and simple method for internationalizing +programs. + + + gettext-libs + 0.21 + 13.fc37.0.20220203 + x86_64 + https://www.gnu.org/software/gettext/ + Libraries for gettext + This package contains libraries used internationalization support. + glibc - 2.32 - 4.fc33 + 2.35.9000 + 20.fc37 x86_64 http://www.gnu.org/software/glibc/ The GNU libc libraries @@ -127,115 +591,1670 @@ 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 + 2.35.9000 + 20.fc37 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. + + + glibc-gconv-extra + 2.35.9000 + 20.fc37 + x86_64 + http://www.gnu.org/software/glibc/ + All iconv converter modules for glibc. + This package contains all iconv converter modules built in glibc. + + + glibc-minimal-langpack + 2.35.9000 + 20.fc37 + x86_64 + http://www.gnu.org/software/glibc/ + Minimal language packs for glibc. + This is a Meta package that is used to install minimal language packs. +This package ensures you can use C, POSIX, or C.UTF-8 locales, but +nothing else. It is designed for assembling a minimal system. + + + gmp + 1 + 6.2.1 + 2.fc36 + x86_64 + https://gmplib.org/ + GNU arbitrary precision library + The gmp package contains GNU MP, a library for arbitrary precision +arithmetic, signed integers operations, rational numbers and floating +point numbers. GNU MP is designed for speed, for both small and very +large operands. GNU MP is fast because it uses fullwords as the basic +arithmetic type, it uses fast algorithms, it carefully optimizes +assembly code for many CPUs' most common inner loops, and it generally +emphasizes speed over simplicity/elegance in its operations. + +Install the gmp package if you need a fast arbitrary precision +library. gpg-pubkey - 9570ff31 - 5e3006fb + eb10b464 + 6202d9c6 (none) (none) - Fedora (33) <fedora-33-primary@fedoraproject.org> public key + Fedora (38) <fedora-38-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 +Version: rpm-4.17.0 (NSS-3) + +mQINBGIC2cYBEADJye1aE0AR17qwj6wsHWlCQlcihmqkL8s4gbOk1IevBbH4iXJx +lu6bN+NhTcCCX6eHmaL5Pwb/bpkMmLR+/r1D2cLDK24YzvN6kJnwRQUTf2dbqYmg +mNBgIMm+kAabBZPwUHUzyQ9CT/WJpYr1OYu8JIkdxF35nrPewnnOUUqxqbi8fXRQ +gskSLF8UveiOjFIqmWwlPwT1UtnevAaF80UGQlkwFvqjjh4b9vKY2gHMAQwt+wg5 +HFFCSwSrnd88ZoDb3pKvDMeurYUiPzF5f2r+ziVkMuaSNckvp58uge7HvyqQPAdJ +ZRswCCxhUAo9VqkNfB4Ud25ASyalk9jOE3HB8E35gFfPXvuX1n15THXNcwMEiybk +Omne2YwXL8ShGNr5otjqywThMrrqcl2g/pJVTcpDHTR5Hn9YRp+GHlYLjyEr+/x7 +xM19y9ca9GUiJqDbEREHcKKIhYiGmcIjjcJvei/3C/aM4pqeGFJBbVSnw3qeMxH/ +6ArAMA1sAdShCkv2YjlcF0r4uoCjXdS3xrKLz9PSCquot7RySnOE9TZ7flfJll7Z +q+lNaSeJg7FK8VWSUb9Lit6VEYVbzWKzespDDbujrHbFpydyq8gXurk7bSR2w0te +gsmytQqT/w1z2bydgGF6SfY9Px0wuA8GQKr48l5Bhdc6+vHHFqPKzz0PVQARAQAB +tDFGZWRvcmEgKDM4KSA8ZmVkb3JhLTM4LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v +cmc+iQJOBBMBCAA4FiEEalG7q7o9VGe2FxIhgJqNfOsQtGQFAmIC2cYCGw8FCwkI +BwIGFQoJCAsCBBYCAwECHgECF4AACgkQgJqNfOsQtGScyw/7BLmD4Fwi4QZY94zl +vlJdNufZRavOemSIVVDHoCr8pQBAdrvoMypxJd5zM4ODIqFsjdYpFti+Tkeq4/4U +25UoLPEOtU8UDt2uq7LqfdCxspaj7VyXAJIkpf7wEvLS4Jzo+YaMIlsd0dCrMXTM +vhu4gKpBFW6C+gGlmuDyTJbyrf7ilytgVzVtIfRrT7XffylviIlZHwKm43UDjvzX +YEl3EAFR1RjATwXMy2aJh7GCNsz+fKs+7YRKQUhpMF5un/2pyNJO+LbVGGwGZvga +K9Kfsg/4r1ync4nDDD1dadKIHhobDeiJ9uZLoBvvVDz7Ywu7q/vv4zIPxstYBNq4 +6fLKDtYXuJCK0EV9Qy4ox67t0UGlaRGH8y5YUqOI10xH7iQej0xWlSc8w2dKhPz8 +z9XLv2OMK+PvqvflhFHhWkqEoQRqTu0TVD0fLLe4lqieJlqZcJqW0F9G/vNSSWmf +POLa/Nim71gL2fPjCJOIRV4K/cJSyBmu5NchG7dHD5sUtJxZ4TFSuepaBZ8cPK1x +e26TaCBqoUWgUXWmw+P89aOpYOJYEFfT/VAm2Ywn+c1EFUmD+30wQ7aP/RUFl94z +n0BjqsWDnCKVFHydZ0TZSpeADmXMg2VYZPcp/cQR1KjoBoDxAscis7b1XPQUg7CB +zquq5jBVAnsNIhs7g47GWKyDUJM= +=aCLl -----END PGP PUBLIC KEY BLOCK----- - libgcc - 10.2.1 - 9.fc33 + gpg-pubkey + 5323552a + 6112bcdc + (none) + (none) + Fedora (37) <fedora-37-primary@fedoraproject.org> public key + -----BEGIN PGP PUBLIC KEY BLOCK----- +Version: rpm-4.17.0 (NSS-3) + +mQINBGESvNwBEAC7HsCDTlugVeDSMFX6aW3zAPFMfvBssNj+89fdmbxcI9t7UY6f +HvkkGziUET8e+9jB8R2/wXQCGOw1J+sfmwO4aN0LdVQjhKvVNj+F5jWt3m5FAIBa +OTWS6Kvqw2ECTpH7fD86541eK3BuCni6d5U3PCd73t976FcUmpQ/1AthqMksM0Jz +cJapvNmLTCR0NZ2XyyLmn/K1hgNXe8G5j0cSrJiY+Zpz5aQkT96j96Jm6W2A+tBI +icU4n6V4vlj2TxmCumtXJGXGBGJnof/dCgh45aqi+sk5c429ns+5sooYcaEJojj6 +FYSITv10l+az6ZMJz/j61VYSkhMY8hQ4Wd+yL2JVzLE9N9V0L95sX1yEZ5ILmzwx +oRKe4WHSBE6yMxNWobv7hmC+3ZC5mLPaEDS/g/0xuQj9Sy9eT2mhhFPxOv29YQ+P +sC3zXHJMMT0tlGd72PVHQQ0JYONfMhcC+7AHGFGz8p4/wor2jIFG1ouqE6Lfzm8o +XWZMYm3AydlrP/xkYaoWNE3jL/+dskSBr/Yz7ZzlkAqH9lb1HKnXQLTrw6gz6pmI +KufSDXjEFNxnFI/9gMlshJtk5+QSDzezmxFm+NMviSvDUNAVIzrU1D84dauBYph4 +OrJVeECQHEotny/I53AdlVwLYB4TWkObzTs6vtV7Pz1TK2CmHpe3UW72xwARAQAB +tDFGZWRvcmEgKDM3KSA8ZmVkb3JhLTM3LXByaW1hcnlAZmVkb3JhcHJvamVjdC5v +cmc+iQJOBBMBCAA4FiEErLXuToMcdLt8Fo0n9VrT+1MjVSoFAmESvNwCGw8FCwkI +BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ9VrT+1MjVSoPMhAAist7kK/YtcyBL/dt +P55hPrkJT6Ay+e2Dvt4Pixe4iT32Y3jG12aoX2LY//mxVOOpV+EhXYTTb5aLt2Jj +a8/qCKJFk7zuCOxa1hgdRcjoR7ZbU0lNjD9mMCax/YT9QafcaMEib/FlknP3g1SN +GRSKLObTJd6BbtZXCE80JRIX+Dy6+/Oz7LXRXeKpiimhlXT1wuTaqAJEtuHdQvg7 +dkL4DzAJ2FiURVd5gvgo266WaCMafJjFRrSGHJm0c+V+0Z9NsuH80JbPm+rCUh5U +E9PMyztqlqtldtqc1+aZ1iUbVuXY059BUmlAhmf5sAlBktY+hEabH/4kmfGccbBL +TyBIn03Y9q9173okZSUe6q16m/hbbWI8dwkSpIADZbGGJbRi8PJpCg9y6KI355qD +atE2irleoy6eXqpKa+uPTRBk7i/r6jDoA+u+tZyFfcEnwvSWP8cN1j5mNklvITZl +YF1n5b3fejkZVdOmRZQNkyzMxYEd4UZFQZNYrx0nltAagRS8b5ikqNk2UTl+dyBG +k9gLOSZhAa2JdmAqwe9rT69jaa4kZMLlxPPC3246s83t0s7lp7vF+zLPfPSvxpsU +tg+fuT+OFKWYdBFF7VkEA+wezHAznIP6TPyQXbBpkzE889/hOXy4BYs0wy8Bpda/ +Ve2Ba329f99dSCZKImi5DPCxJY4= +=ZmVd +-----END PGP PUBLIC KEY BLOCK----- + + + + grep + 3.7 + 2.fc36 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. + https://www.gnu.org/software/grep/ + Pattern matching utilities + The GNU versions of commonly used grep utilities. Grep searches through +textual input for lines which contain a match to a specified pattern and then +prints the matching lines. GNU's grep utilities include grep, egrep and fgrep. + +GNU grep is needed by many scripts, so it shall be installed on every system. - ncurses-base - 6.2 - 3.20200222.fc33 + grub2-common + 1 + 2.06 + 41.fc37 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. + http://www.gnu.org/software/grub/ + grub2 common layout + This package provides some directories which are required by various grub2 +subpackages. - ncurses-libs - 6.2 - 3.20200222.fc33 + grub2-tools + 1 + 2.06 + 41.fc37 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. + http://www.gnu.org/software/grub/ + Support tools for GRUB. + +The GRand Unified Bootloader (GRUB) is a highly configurable and +customizable bootloader with modular architecture. It supports a rich +variety of kernel formats, file systems, computer architectures and +hardware devices. -This package contains the ncurses libraries. +This subpackage provides tools for support of all platforms. - 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. + grub2-tools-minimal + 1 + 2.06 + 41.fc37 + x86_64 + http://www.gnu.org/software/grub/ + Support tools for GRUB. + +The GRand Unified Bootloader (GRUB) is a highly configurable and +customizable bootloader with modular architecture. It supports a rich +variety of kernel formats, file systems, computer architectures and +hardware devices. + +This subpackage provides tools for support of all platforms. - tzdata - 2021a - 1.fc33 + grubby + 8.40 + 60.fc37 + x86_64 + (none) + Command line tool for updating bootloader configs + This package provides a grubby compatibility script that manages +BootLoaderSpec files and is meant to be backward compatible with +the previous grubby tool. + + + gzip + 1.12 + 1.fc37 + x86_64 + https://www.gzip.org/ + GNU data compression program + The gzip package contains the popular GNU gzip data compression +program. Gzipped files have a .gz extension. + +Gzip should be installed on your system, because it is a +very commonly used data compression program. + + + json-c + 0.16 + 1.fc37 + x86_64 + https://github.com/json-c/json-c + JSON implementation in C + JSON-C implements a reference counting object model that allows you +to easily construct JSON objects in C, output them as JSON formatted +strings and parse JSON formatted strings back into the C representation +of JSON objects. It aims to conform to RFC 7159. + + + kbd + 2.4.0 + 9.fc36 + x86_64 + http://www.kbd-project.org/ + Tools for configuring the console (keyboard, virtual terminals, etc.) + The kbd package contains tools for managing a Linux +system's console's behavior, including the keyboard, the screen +fonts, the virtual terminals and font files. + + + kbd-misc + 2.4.0 + 9.fc36 noarch - https://www.iana.org/time-zones - Timezone data - This package contains data files with rules for various timezones around -the world. + http://www.kbd-project.org/ + Data for kbd package + The kbd-misc package contains data for kbd package - console fonts, +keymaps etc. Please note that kbd-misc is not helpful without kbd. + + + kernel + 5.19.0 + 0.rc1.14.fc37 + x86_64 + https://www.kernel.org/ + The Linux kernel + The kernel meta package + + + kernel-core + 5.19.0 + 0.rc1.14.fc37 + x86_64 + https://www.kernel.org/ + The Linux kernel + The kernel package contains the Linux kernel (vmlinuz), the core of any +Linux operating system. The kernel handles the basic functions +of the operating system: memory allocation, process allocation, device +input and output, etc. + + + kernel-modules + 5.19.0 + 0.rc1.14.fc37 + x86_64 + https://www.kernel.org/ + kernel modules to match the core kernel + This package provides commonly used kernel modules for the core kernel package. + + + keyutils-libs + 1.6.1 + 4.fc36 + x86_64 + http://people.redhat.com/~dhowells/keyutils/ + Key utilities library + This package provides a wrapper library for the key management facility system +calls. + + + kmod + 29 + 7.fc36 + x86_64 + https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git + Linux kernel module management utilities + The kmod package provides various programs needed for automatic +loading and unloading of modules under 2.6, 3.x, and later kernels, as well +as other module management programs. Device drivers and filesystems are two +examples of loaded and unloaded modules. + + + kmod-libs + 29 + 7.fc36 + x86_64 + https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git + Libraries to handle kernel module loading and unloading + The kmod-libs package provides runtime libraries for any application that +wishes to load or unload Linux kernel modules from the running system. + + + kpartx + 0.8.9 + 1.fc37 + x86_64 + http://christophe.varoqui.free.fr/ + Partition device manager for device-mapper devices + kpartx manages partition creation and removal for device-mapper devices. + + + krb5-libs + 1.19.2 + 9.fc37 + x86_64 + https://web.mit.edu/kerberos/www/ + The non-admin shared libraries used by Kerberos 5 + Kerberos is a network authentication system. The krb5-libs package +contains the shared libraries needed by Kerberos 5. If you are using +Kerberos, you need to install this package. + + + libacl + 2.3.1 + 3.fc36 + x86_64 + https://savannah.nongnu.org/projects/acl + Dynamic library for access control list support + This package contains the libacl.so dynamic library which contains +the POSIX 1003.1e draft standard 17 functions for manipulating access +control lists. + + + libarchive + 3.6.1 + 1.fc37 + x86_64 + https://www.libarchive.org/ + A library for handling streaming archive formats + Libarchive is a programming library that can create and read several different +streaming archive formats, including most popular tar variants, several cpio +formats, and both BSD and GNU ar variants. It can also write shar archives and +read ISO9660 CDROM images and ZIP archives. + + + libargon2 + 20171227 + 9.fc37 + x86_64 + https://github.com/P-H-C/phc-winner-argon2 + The password-hashing library + Argon2 is a password-hashing function that summarizes the state of the art +in the design of memory-hard functions and can be used to hash passwords +for credential storage, key derivation, or other applications. + + + libattr + 2.5.1 + 4.fc36 + x86_64 + https://savannah.nongnu.org/projects/attr + Dynamic library for extended attribute support + This package contains the libattr.so dynamic library which contains +the extended attribute system calls and library functions. + + + libblkid + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Block device ID library + This is block device identification library, part of util-linux. + + + libbpf + 2 + 0.8.0 + 1.fc37 + x86_64 + https://github.com/libbpf/libbpf + Libbpf library + A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its +supporting header files. The version of the package reflects the version of +ABI. + + + libbrotli + 1.0.9 + 7.fc36 + x86_64 + https://github.com/google/brotli + Library for brotli lossless compression algorithm + Brotli is a generic-purpose lossless compression algorithm that compresses +data using a combination of a modern variant of the LZ77 algorithm, Huffman +coding and 2nd order context modeling, with a compression ratio comparable +to the best currently available general-purpose compression methods. +It is similar in speed with deflate but offers more dense compression. + + + libcap + 2.48 + 4.fc36 + x86_64 + https://sites.google.com/site/fullycapable/ + Library for getting and setting POSIX.1e capabilities + libcap is a library for getting and setting POSIX.1e (formerly POSIX 6) +draft 15 capabilities. + + + libcap-ng + 0.8.3 + 1.fc37 + x86_64 + https://people.redhat.com/sgrubb/libcap-ng/ + Alternate posix capabilities library + Libcap-ng is a library that makes using posix capabilities easier + + + libcbor + 0.7.0 + 5.fc36 + x86_64 + http://libcbor.org + A CBOR parsing library + libcbor is a C library for parsing and generating CBOR. + + + libcom_err + 1.46.5 + 2.fc36 + x86_64 + http://e2fsprogs.sourceforge.net/ + Common error description library + This is the common error description library, part of e2fsprogs. + +libcom_err is an attempt to present a common error-handling mechanism. + + + libcurl + 7.83.1 + 1.fc37 + x86_64 + https://curl.se/ + A library for getting files from web servers + libcurl is a free and easy-to-use client-side URL transfer library, supporting +FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, +SMTP, POP3 and RTSP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, +FTP uploading, HTTP form based upload, proxies, cookies, user+password +authentication (Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer +resume, http proxy tunneling and more. + + + libdb + 5.3.28 + 52.fc37 + x86_64 + http://www.oracle.com/database/berkeley-db/ + The Berkeley DB database library for C + The Berkeley Database (Berkeley DB) is a programmatic toolkit that +provides embedded database support for both traditional and +client/server applications. The Berkeley DB includes B+tree, Extended +Linear Hashing, Fixed and Variable-length record access methods, +transactions, locking, logging, shared memory caching, and database +recovery. The Berkeley DB supports C, C++, and Perl APIs. It is +used by many applications, including Python and Perl, so this should +be installed on all systems. + + + libeconf + 0.4.0 + 3.fc36 + x86_64 + https://github.com/openSUSE/libeconf + Enhanced config file parser library + libeconf is a highly flexible and configurable library to parse and manage +key=value configuration files. It reads configuration file snippets from +different directories and builds the final configuration file from it. + + + libevent + 2.1.12 + 6.fc36 + x86_64 + http://libevent.org/ + Abstract asynchronous event notification library + The libevent API provides a mechanism to execute a callback function +when a specific event occurs on a file descriptor or after a timeout +has been reached. libevent is meant to replace the asynchronous event +loop found in event driven network servers. An application just needs +to call event_dispatch() and can then add or remove events dynamically +without having to change the event loop. + + + libfdisk + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Partitioning library for fdisk-like programs + This is library for fdisk-like programs, part of util-linux. + + + libffi + 3.4.2 + 8.fc36 + x86_64 + http://sourceware.org/libffi + A portable foreign function interface library + Compilers for high level languages generate code that follow certain +conventions. These conventions are necessary, in part, for separate +compilation to work. One such convention is the "calling convention". +The calling convention is a set of assumptions made by the compiler +about where function arguments will be found on entry to a function. A +calling convention also specifies where the return value for a function +is found. + +Some programs may not know at the time of compilation what arguments +are to be passed to a function. For instance, an interpreter may be +told at run-time about the number and types of arguments used to call a +given function. `Libffi' can be used in such programs to provide a +bridge from the interpreter program to compiled code. + +The `libffi' library provides a portable, high level programming +interface to various calling conventions. This allows a programmer to +call any function specified by a call interface description at run time. + +FFI stands for Foreign Function Interface. A foreign function +interface is the popular name for the interface that allows code +written in one language to call code written in another language. The +`libffi' library really only provides the lowest, machine dependent +layer of a fully featured foreign function interface. A layer must +exist above `libffi' that handles type conversions for values passed +between the two languages. + + + libfido2 + 1.11.0 + 1.fc37 + x86_64 + https://github.com/Yubico/libfido2 + FIDO2 library + libfido2 is an open source library to support the FIDO2 protocol. FIDO2 is +an open authentication standard that consists of the W3C Web Authentication +specification (WebAuthn API), and the Client to Authentication Protocol +(CTAP). CTAP is an application layer protocol used for communication +between a client (browser) or a platform (operating system) with an external +authentication device (for example the Yubico Security Key). + + + libgcc + 12.1.1 + 1.fc37 + x86_64 + http://gcc.gnu.org + GCC version 12 shared support library + This package contains GCC shared support library which is needed +e.g. for exception handling support. + + + libgcrypt + 1.10.1 + 3.fc37 + x86_64 + https://www.gnupg.org/ + A general-purpose cryptography library + Libgcrypt is a general purpose crypto library based on the code used +in GNU Privacy Guard. This is a development version. + + + libgomp + 12.1.1 + 1.fc37 + x86_64 + http://gcc.gnu.org + GCC OpenMP v4.5 shared support library + This package contains GCC shared support library which is needed +for OpenMP v4.5 support. + + + libgpg-error + 1.45 + 1.fc37 + x86_64 + https://www.gnupg.org/related_software/libgpg-error/ + Library for error values used by GnuPG components + This is a library that defines common error values for all GnuPG +components. Among these are GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, +pinentry, SmartCard Daemon and possibly more in the future. + + + libidn2 + 2.3.2 + 4.fc36 + x86_64 + https://www.gnu.org/software/libidn/#libidn2 + Library to support IDNA2008 internationalized domain names + Libidn2 is an implementation of the IDNA2008 specifications in RFC +5890, 5891, 5892, 5893 and TR46 for internationalized domain names +(IDN). It is a standalone library, without any dependency on libidn. + + + libkcapi + 1.3.1 + 4.fc36 + x86_64 + https://www.chronox.de/libkcapi.html + User space interface to the Linux Kernel Crypto API + libkcapi allows user-space to access the Linux kernel crypto API. + +This library uses the netlink interface and exports easy to use APIs +so that a developer does not need to consider the low-level netlink +interface handling. + +The library does not implement any cipher algorithms. All consumer +requests are sent to the kernel for processing. Results from the +kernel crypto API are returned to the consumer via the library API. + +The kernel interface and therefore this library can be used by +unprivileged processes. + + + libkcapi-hmaccalc + 1.3.1 + 4.fc36 + x86_64 + https://www.chronox.de/libkcapi.html + Drop-in replacements for hmaccalc provided by the libkcapi package + Provides drop-in replacements for sha*hmac tools (from package +hmaccalc) using libkcapi. + + + libmount + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Device mounting library + This is the device mounting library, part of util-linux. + + + libnghttp2 + 1.47.0 + 1.fc37 + x86_64 + https://nghttp2.org/ + A library implementing the HTTP/2 protocol + libnghttp2 is a library implementing the Hypertext Transfer Protocol +version 2 (HTTP/2) protocol in C. + + + libnsl2 + 2.0.0 + 3.fc36 + x86_64 + https://github.com/thkukuk/libnsl + Public client interface library for NIS(YP) and NIS+ + This package contains the libnsl library. This library contains +the public client interface for NIS(YP) and NIS+. +This code was formerly part of glibc, but is now standalone to +be able to link against TI-RPC for IPv6 support. + + + libpsl + 0.21.1 + 5.fc36 + x86_64 + https://rockdaboot.github.io/libpsl + C library for the Publix Suffix List + libpsl is a C library to handle the Public Suffix List. A "public suffix" is a +domain name under which Internet users can directly register own names. + +Browsers and other web clients can use it to + +- Avoid privacy-leaking "supercookies"; +- Avoid privacy-leaking "super domain" certificates; +- Domain highlighting parts of the domain in a user interface; +- Sorting domain lists by site; + +Libpsl... + +- has built-in PSL data for fast access; +- allows to load PSL data from files; +- checks if a given domain is a "public suffix"; +- provides immediate cookie domain verification; +- finds the longest public part of a given domain; +- finds the shortest private part of a given domain; +- works with international domains (UTF-8 and IDNA2008 Punycode); +- is thread-safe; +- handles IDNA2008 UTS#46; + + + libpwquality + 1.4.4 + 7.fc36 + x86_64 + https://github.com/libpwquality/libpwquality/ + A library for password generation and password quality checking + This is a library for password quality checks and generation +of random passwords that pass the checks. +This library uses the cracklib and cracklib dictionaries +to perform some of the checks. + + + libseccomp + 2.5.3 + 2.fc36 + x86_64 + https://github.com/seccomp/libseccomp + Enhanced seccomp library + The libseccomp library provides an easy to use interface to the Linux Kernel's +syscall filtering mechanism, seccomp. The libseccomp API allows an application +to specify which syscalls, and optionally which syscall arguments, the +application is allowed to execute, all of which are enforced by the Linux +Kernel. + + + libselinux + 3.4 + 0.rc3.1.fc37 + x86_64 + https://github.com/SELinuxProject/selinux/wiki + SELinux library and simple utilities + Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libselinux provides an API for SELinux applications to get and set +process and file security contexts and to obtain security policy +decisions. Required for any applications that use the SELinux API. + + + libsemanage + 3.4 + 0.rc3.1.fc37 + x86_64 + https://github.com/SELinuxProject/selinux/wiki + SELinux binary policy manipulation library + Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libsemanage provides an API for the manipulation of SELinux binary policies. +It is used by checkpolicy (the policy compiler) and similar tools, as well +as by programs like load_policy that need to perform specific transformations +on binary policies such as customizing policy boolean settings. + + + libsepol + 3.4 + 0.rc3.1.fc37 + x86_64 + https://github.com/SELinuxProject/selinux/wiki + SELinux binary policy manipulation library + Security-enhanced Linux is a feature of the Linux® kernel and a number +of utilities with enhanced security functionality designed to add +mandatory access controls to Linux. The Security-enhanced Linux +kernel contains new architectural components originally developed to +improve the security of the Flask operating system. These +architectural components provide general support for the enforcement +of many kinds of mandatory access control policies, including those +based on the concepts of Type Enforcement®, Role-based Access +Control, and Multi-level Security. + +libsepol provides an API for the manipulation of SELinux binary policies. +It is used by checkpolicy (the policy compiler) and similar tools, as well +as by programs like load_policy that need to perform specific transformations +on binary policies such as customizing policy boolean settings. + + + libsigsegv + 2.14 + 2.fc36 + x86_64 + https://www.gnu.org/software/libsigsegv/ + Library for handling page faults in user mode + This is a library for handling page faults in user mode. A page fault +occurs when a program tries to access to a region of memory that is +currently not available. Catching and handling a page fault is a useful +technique for implementing: + - pageable virtual memory + - memory-mapped access to persistent databases + - generational garbage collectors + - stack overflow handlers + - distributed shared memory + + + libsmartcols + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Formatting library for ls-like programs + This is library for ls-like terminal programs, part of util-linux. + + + libssh + 0.9.6 + 4.fc36 + x86_64 + http://www.libssh.org + A library implementing the SSH protocol + The ssh library was designed to be used by programmers needing a working SSH +implementation by the mean of a library. The complete control of the client is +made by the programmer. With libssh, you can remotely execute programs, transfer +files, use a secure and transparent tunnel for your remote programs. With its +Secure FTP implementation, you can play with remote files easily, without +third-party programs others than libcrypto (from openssl). + + + libssh-config + 0.9.6 + 4.fc36 + noarch + http://www.libssh.org + Configuration files for libssh + The libssh-config package provides the default configuration files for libssh. + + + libstdc++ + 12.1.1 + 1.fc37 + x86_64 + http://gcc.gnu.org + GNU Standard C++ Library + The libstdc++ package contains a rewritten standard compliant GCC Standard +C++ Library. + + + libtasn1 + 4.18.0 + 2.fc36 + x86_64 + http://www.gnu.org/software/libtasn1/ + The ASN.1 library used in GNUTLS + A library that provides Abstract Syntax Notation One (ASN.1, as specified +by the X.680 ITU-T recommendation) parsing and structures management, and +Distinguished Encoding Rules (DER, as per X.690) encoding and decoding functions. + + + libtirpc + 1.3.2 + 1.rc1.fc36.1 + x86_64 + http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary + Transport Independent RPC Library + This package contains SunLib's implementation of transport-independent +RPC (TI-RPC) documentation. This library forms a piece of the base of +Open Network Computing (ONC), and is derived directly from the +Solaris 2.3 source. + +TI-RPC is an enhanced version of TS-RPC that requires the UNIX System V +Transport Layer Interface (TLI) or an equivalent X/Open Transport Interface +(XTI). TI-RPC is on-the-wire compatible with the TS-RPC, which is supported +by almost 70 vendors on all major operating systems. TS-RPC source code +(RPCSRC 4.0) remains available from several internet sites. + + + libunistring + 1.0 + 1.fc36 + x86_64 + https://www.gnu.org/software/libunistring/ + GNU Unicode string library + This portable C library implements Unicode string types in three flavours: +(UTF-8, UTF-16, UTF-32), together with functions for character processing +(names, classifications, properties) and functions for string processing +(iteration, formatted output, width, word breaks, line breaks, normalization, +case folding and regular expressions). + + + libutempter + 1.2.1 + 6.fc36 + x86_64 + ftp://ftp.altlinux.org/pub/people/ldv/utempter + A privileged helper for utmp/wtmp updates + This library provides interface for terminal emulators such as +screen and xterm to record user sessions to utmp and wtmp files. + + + libuuid + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Universally unique ID library + This is the universally unique ID library, part of util-linux. + +The libuuid library generates and parses 128-bit universally unique +id's (UUID's). A UUID is an identifier that is unique across both +space and time, with respect to the space of all UUIDs. A UUID can +be used for multiple purposes, from tagging objects with an extremely +short lifetime, to reliably identifying very persistent objects +across a network. + +See also the "uuid" package, which is a separate implementation. + + + libverto + 0.3.2 + 3.fc36 + x86_64 + https://github.com/latchset/libverto + Main loop abstraction library + libverto provides a way for libraries to expose asynchronous interfaces +without having to choose a particular event loop, offloading this +decision to the end application which consumes the library. + +If you are packaging an application, not library, based on libverto, +you should depend either on a specific implementation module or you +can depend on the virtual provides 'libverto-module-base'. This will +ensure that you have at least one module installed that provides io, +timeout and signal functionality. Currently glib is the only module +that does not provide these three because it lacks signal. However, +glib will support signal in the future. + + + libxcrypt + 4.4.28 + 1.fc37 + x86_64 + https://github.com/besser82/libxcrypt + Extended crypt library for descrypt, md5crypt, bcrypt, and others + libxcrypt is a modern library for one-way hashing of passwords. It +supports a wide variety of both modern and historical hashing methods: +yescrypt, gost-yescrypt, scrypt, bcrypt, sha512crypt, sha256crypt, +md5crypt, SunMD5, sha1crypt, NT, bsdicrypt, bigcrypt, and descrypt. +It provides the traditional Unix crypt and crypt_r interfaces, as well +as a set of extended interfaces pioneered by Openwall Linux, crypt_rn, +crypt_ra, crypt_gensalt, crypt_gensalt_rn, and crypt_gensalt_ra. + +libxcrypt is intended to be used by login(1), passwd(1), and other +similar programs; that is, to hash a small number of passwords during +an interactive authentication dialogue with a human. It is not suitable +for use in bulk password-cracking applications, or in any other situation +where speed is more important than careful handling of sensitive data. +However, it is intended to be fast and lightweight enough for use in +servers that must field thousands of login attempts per minute. + +This version of the library does not provide the legacy API functions +that have been provided by glibc's libcrypt.so.1. + + + libxcrypt-compat + 4.4.28 + 1.fc37 + x86_64 + https://github.com/besser82/libxcrypt + Compatibility library providing legacy API functions + This package contains the library providing the compatibility API +for applications that are linked against glibc's libxcrypt, or that +are still using the unsafe and deprecated, encrypt, encrypt_r, +setkey, setkey_r, and fcrypt functions, which are still required by +recent versions of POSIX, the Single UNIX Specification, and various +other standards. + +All existing binary executables linked against glibc's libcrypt should +work unmodified with the library supplied by this package. + + + libxkbcommon + 1.4.1 + 1.fc37 + x86_64 + http://www.x.org + X.Org X11 XKB parsing library + libxkbcommon is the X.Org library for compiling XKB maps into formats usable by +the X Server or other display servers. + + + libxml2 + 2.9.14 + 1.fc37 + x86_64 + http://xmlsoft.org/ + Library providing XML and HTML support + This library allows to manipulate XML files. It includes support +to read, modify and write XML and HTML files. There is DTDs support +this includes parsing and validation even with complex DtDs, either +at parse time or later once the document has been modified. The output +can be a simple SAX stream or and in-memory DOM like representations. +In this case one can use the built-in XPath and XPointer implementation +to select sub nodes or ranges. A flexible Input/Output mechanism is +available, with existing HTTP and FTP modules and combined to an +URI library. + + + libzstd + 1.5.2 + 2.fc37 + x86_64 + https://github.com/facebook/zstd + Zstd shared library + Zstandard compression shared library. + + + linux-firmware + 20220509 + 133.fc37 + noarch + http://www.kernel.org/ + Firmware files used by the Linux kernel + This package includes firmware files required for some devices to +operate. + + + linux-firmware-whence + 20220509 + 133.fc37 + noarch + http://www.kernel.org/ + WHENCE License file + This package contains the WHENCE license file which documents the vendor license details. + + + lua-libs + 5.4.4 + 2.fc37 + x86_64 + https://www.lua.org/ + Libraries for lua + This package contains the shared libraries for lua. + + + lz4-libs + 1.9.3 + 4.fc36 + x86_64 + https://lz4.github.io/lz4/ + Libaries for lz4 + This package contains the libaries for lz4. + + + memstrack + 0.2.4 + 2.fc36 + x86_64 + https://github.com/ryncsn/memstrack + A memory allocation tracer, like a hot spot analyzer for memory allocation + A memory allocation tracer, like a hot spot analyzer for memory allocation + + + mkpasswd + 5.5.13 + 1.fc37 + x86_64 + http://www.linux.it/~md/software/ + Encrypt a password with crypt(3) function using a salt + mkpasswd tool encrypts a given password with the crypt(3) libc function +using a given salt. + + + mpdecimal + 2.5.1 + 3.fc36 + x86_64 + http://www.bytereef.org/mpdecimal/index.html + Library for general decimal arithmetic + The package contains a library limpdec implementing General Decimal Arithmetic +Specification. The specification, written by Mike Cowlishaw from IBM, defines +a general purpose arbitrary precision data type together with rigorously +specified functions and rounding behavior. + + + mpfr + 4.1.0 + 9.fc36 + x86_64 + https://www.mpfr.org/ + C library for multiple-precision floating-point computations + The MPFR library is a C library for multiple-precision floating-point +computations with "correct rounding". The MPFR is efficient and +also has a well-defined semantics. It copies the good ideas from the +ANSI/IEEE-754 standard for double-precision floating-point arithmetic +(53-bit mantissa). MPFR is based on the GMP multiple-precision library. + + + ncurses-base + 6.3 + 2.20220501.fc37 + 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.3 + 2.20220501.fc37 + 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. + + + openldap + 2.6.2 + 1.fc37 + x86_64 + http://www.openldap.org/ + LDAP support libraries + OpenLDAP is an open source suite of LDAP (Lightweight Directory Access +Protocol) applications and development tools. LDAP is a set of +protocols for accessing directory services (usually phone book style +information, but other information is possible) over the Internet, +similar to the way DNS (Domain Name System) information is propagated +over the Internet. The openldap package contains configuration files, +libraries, and documentation for OpenLDAP. + + + openssl-libs + 1 + 3.0.2 + 4.fc37 + x86_64 + http://www.openssl.org/ + A general purpose cryptography library with TLS implementation + OpenSSL is a toolkit for supporting cryptography. The openssl-libs +package contains the libraries that are used by various applications which +support cryptographic algorithms and protocols. + + + openssl-pkcs11 + 0.4.11 + 8.fc36 + x86_64 + https://github.com/OpenSC/libp11 + A PKCS#11 engine for use with OpenSSL + openssl-pkcs11 enables hardware security module (HSM), and smart card support in +OpenSSL applications. More precisely, it is an OpenSSL engine which makes +registered PKCS#11 modules available for OpenSSL applications. The engine is +optional and can be loaded by configuration file, command line or through the +OpenSSL ENGINE API. + + + os-prober + 1.77 + 9.fc36 + x86_64 + http://kitenet.net/~joey/code/os-prober/ + Probes disks on the system for installed operating systems + This package detects other OSes available on a system and outputs the results +in a generic machine-readable format. Support for new OSes and Linux +distributions can be added easily. + + + p11-kit + 0.24.1 + 2.fc36 + x86_64 + http://p11-glue.freedesktop.org/p11-kit.html + Library for loading and sharing PKCS#11 modules + p11-kit provides a way to load and enumerate PKCS#11 modules, as well +as a standard configuration setup for installing PKCS#11 modules in +such a way that they're discoverable. + + + p11-kit-trust + 0.24.1 + 2.fc36 + x86_64 + http://p11-glue.freedesktop.org/p11-kit.html + System trust module from p11-kit + The p11-kit-trust package contains a system trust PKCS#11 module which +contains certificate anchors and black lists. + + + pam + 1.5.2 + 12.fc37 + x86_64 + http://www.linux-pam.org/ + An extensible library which provides authentication for applications + PAM (Pluggable Authentication Modules) is a system security tool that +allows system administrators to set authentication policy without +having to recompile programs that handle authentication. + + + pam-libs + 1.5.2 + 12.fc37 + x86_64 + http://www.linux-pam.org/ + Shared libraries of the PAM package + PAM (Pluggable Authentication Modules) is a system security tool that +allows system administrators to set authentication policy without +having to recompile programs that handle authentication. The pam-libs +contains the shared libraries for PAM. + + + pcre + 8.45 + 1.fc36.1 + x86_64 + https://www.pcre.org/ + Perl-compatible regular expression library + PCRE, Perl-compatible regular expression, library has its own native API, but +a set of wrapper functions that are based on the POSIX API are also supplied +in the libpcreposix library. Note that this just provides a POSIX calling +interface to PCRE: the regular expressions themselves still follow Perl syntax +and semantics. This package provides support for strings in 8-bit and UTF-8 +encodings. Detailed change log is provided by pcre-doc package. + + + pcre2 + 10.40 + 1.fc37 + x86_64 + https://www.pcre.org/ + Perl-compatible regular expression library + PCRE2 is a re-working of the original PCRE (Perl-compatible regular +expression) library to provide an entirely new API. + +PCRE2 is written in C, and it has its own API. There are three sets of +functions, one for the 8-bit library, which processes strings of bytes, one +for the 16-bit library, which processes strings of 16-bit values, and one for +the 32-bit library, which processes strings of 32-bit values. There are no C++ +wrappers. This package provides support for strings in 8-bit and UTF-8 +encodings. Install pcre2-utf16 or pcre2-utf32 packages for the other ones. + +The distribution does contain a set of C wrapper functions for the 8-bit +library that are based on the POSIX regular expression API (see the pcre2posix +man page). These can be found in a library called libpcre2posix. Note that +this just provides a POSIX calling interface to PCRE2; the regular expressions +themselves still follow Perl syntax and semantics. The POSIX API is +restricted, and does not give full access to all of PCRE2's facilities. + + + pcre2-syntax + 10.40 + 1.fc37 + noarch + https://www.pcre.org/ + Documentation for PCRE2 regular expressions + This is a set of manual pages that document a syntax of the regular +expressions implemented by the PCRE2 library. + + + pigz + 2.7 + 1.fc37 + x86_64 + https://www.zlib.net/pigz/ + Parallel implementation of gzip + pigz, which stands for parallel implementation of gzip, +is a fully functional replacement for gzip that exploits +multiple processors and multiple cores to the hilt when +compressing data. + + + popt + 1.18 + 7.fc36 + x86_64 + https://github.com/rpm-software-management/popt/ + C library for parsing command line parameters + Popt is a C library for parsing command line parameters. Popt was +heavily influenced by the getopt() and getopt_long() functions, but +it improves on them by allowing more powerful argument expansion. +Popt can parse arbitrary argv[] style arrays and automatically set +variables based on command line arguments. Popt allows command line +arguments to be aliased via configuration files and includes utility +functions for parsing arbitrary strings into argv[] arrays using +shell-like rules. + + + procps-ng + 3.3.17 + 5.fc37 + x86_64 + https://sourceforge.net/projects/procps-ng/ + System and process monitoring utilities + The procps package contains a set of system utilities that provide +system information. Procps includes ps, free, skill, pkill, pgrep, +snice, tload, top, uptime, vmstat, pidof, pmap, slabtop, w, watch, +pwdx and pidwait. +The ps command displays a snapshot of running processes. The top command +provides a repetitive update of the statuses of running processes. +The free command displays the amounts of free and used memory on your +system. The skill command sends a terminate command (or another +specified signal) to a specified set of processes. The snice +command is used to change the scheduling priority of specified +processes. The tload command prints a graph of the current system +load average to a specified tty. The uptime command displays the +current time, how long the system has been running, how many users +are logged on, and system load averages for the past one, five, +and fifteen minutes. The w command displays a list of the users +who are currently logged on and what they are running. The watch +program watches a running program. The vmstat command displays +virtual memory statistics about processes, memory, paging, block +I/O, traps, and CPU activity. The pwdx command reports the current +working directory of a process or processes. The pidwait command +waits for processes of specified names. + + + publicsuffix-list-dafsa + 20210518 + 4.fc36 + noarch + https://publicsuffix.org/ + Cross-vendor public domain suffix database in DAFSA form + The Public Suffix List is a cross-vendor initiative to provide +an accurate list of domain name suffixes, maintained by the hard work +of Mozilla volunteers and by submissions from registries. +Software using the Public Suffix List will be able to determine where +cookies may and may not be set, protecting the user from being +tracked across sites. + +This package includes a DAFSA representation of the Public Suffix List +for runtime loading. + + + python-pip-wheel + 22.0.4 + 2.fc37 + noarch + https://pip.pypa.io/ + The pip wheel + A Python wheel of pip to use with venv. + + + python-setuptools-wheel + 60.9.3 + 2.fc37 + noarch + https://pypi.python.org/pypi/setuptools + The setuptools wheel + A Python wheel of setuptools to use with venv. + + + python-unversioned-command + 3.10.4 + 1.fc37 + noarch + https://www.python.org/ + The "python" command that runs Python 3 + This package contains /usr/bin/python - the "python" command that runs Python 3. + + + python3 + 3.10.4 + 1.fc37 + x86_64 + https://www.python.org/ + Python 3.10 interpreter + Python 3.10 is an accessible, high-level, dynamically typed, interpreted +programming language, designed with an emphasis on code readability. +It includes an extensive standard library, and has a vast ecosystem of +third-party libraries. + +The python3 package provides the "python3" executable: the reference +interpreter for the Python language, version 3. +The majority of its standard library is provided in the python3-libs package, +which should be installed automatically along with python3. +The remaining parts of the Python standard library are broken out into the +python3-tkinter and python3-test packages, which may need to be installed +separately. + +Documentation for Python is provided in the python3-docs package. + +Packages containing additional libraries for Python are generally named with +the "python3-" prefix. + + + python3-libs + 3.10.4 + 1.fc37 + x86_64 + https://www.python.org/ + Python runtime libraries + This package contains runtime libraries for use by Python: +- the majority of the Python standard library +- a dynamically linked library for use by applications that embed Python as + a scripting language, and by the main "python3" executable + + + qrencode-libs + 4.1.1 + 2.fc36 + x86_64 + http://fukuchi.org/works/qrencode/ + QR Code encoding library - Shared libraries + The qrencode-libs package contains the shared libraries and header files for +applications that use qrencode. + + + readline + 8.1 + 6.fc36 + x86_64 + https://tiswww.case.edu/php/chet/readline/rltop.html + A library for editing typed command lines + The Readline library provides a set of functions that allow users to +edit command lines. Both Emacs and vi editing modes are available. The +Readline library includes additional functions for maintaining a list +of previously-entered command lines for recalling or editing those +lines, and for performing csh-like history expansion on previous +commands. + + + rpm + 4.18.0 + 0.alpha2.1.fc37 + x86_64 + http://www.rpm.org/ + The RPM package management system + The RPM Package Manager (RPM) is a powerful command line driven +package management system capable of installing, uninstalling, +verifying, querying, and updating software packages. Each software +package consists of an archive of files along with information about +the package like its version, a description, etc. + + + rpm-libs + 4.18.0 + 0.alpha2.1.fc37 + x86_64 + http://www.rpm.org/ + Libraries for manipulating RPM packages + This package contains the RPM shared libraries. + + + sed + 4.8 + 10.fc36 + x86_64 + http://sed.sourceforge.net/ + A GNU stream text editor + The sed (Stream EDitor) editor is a stream or batch (non-interactive) +editor. Sed takes text as input, performs an operation or set of +operations on the text and outputs the modified text. The operations +that sed performs (substitutions, deletions, insertions, etc.) can be +specified in a script file or from the command line. + + + setup + 2.13.10 + 1.fc37 + 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. + + + shadow-utils + 2 + 4.11.1 + 2.fc37 + x86_64 + https://github.com/shadow-maint/shadow + Utilities for managing accounts and shadow password files + The shadow-utils package includes the necessary programs for +converting UNIX password files to the shadow password format, plus +programs for managing user and group accounts. The pwconv command +converts passwords to the shadow password format. The pwunconv command +unconverts shadow passwords and generates a passwd file (a standard +UNIX password file). The pwck command checks the integrity of password +and shadow files. The lastlog command prints out the last login times +for all users. The useradd, userdel, and usermod commands are used for +managing user accounts. The groupadd, groupdel, and groupmod commands +are used for managing group accounts. + + + sqlite-libs + 3.38.5 + 1.fc37 + x86_64 + http://www.sqlite.org/ + Shared library for the sqlite3 embeddable SQL database engine. + This package contains the shared library for sqlite. + + + systemd + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + System and Service Manager + systemd is a system and service manager that runs as PID 1 and starts the rest +of the system. It provides aggressive parallelization capabilities, uses socket +and D-Bus activation for starting services, offers on-demand starting of +daemons, keeps track of processes using Linux control groups, maintains mount +and automount points, and implements an elaborate transactional dependency-based +service control logic. systemd supports SysV and LSB init scripts and works as a +replacement for sysvinit. Other parts of this package are a logging daemon, +utilities to control basic system configuration like the hostname, date, locale, +maintain a list of logged-in users, system accounts, runtime directories and +settings, and a logging daemons. + +This package was built from the 251.1-stable branch of systemd. + + + systemd-libs + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + systemd libraries + Libraries for systemd and udev. + + + systemd-networkd + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + System daemon that manages network configurations + systemd-networkd is a system service that manages networks. It detects and +configures network devices as they appear, as well as creating virtual network +devices. + + + systemd-pam + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + systemd PAM module + Systemd PAM module registers the session with systemd-logind. + + + systemd-resolved + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + Network Name Resolution manager + systemd-resolved is a system service that provides network name resolution to +local applications. It implements a caching and validating DNS/DNSSEC stub +resolver, as well as an LLMNR and MulticastDNS resolver and responder. + + + systemd-udev + 251.1 + 2.fc37 + x86_64 + https://www.freedesktop.org/wiki/Software/systemd + Rule-based device node and kernel event manager + This package contains systemd-udev and the rules and hardware database needed to +manage device nodes. This package is necessary on physical machines and in +virtual machines, but not in containers. + +This package also provides systemd-timesyncd, a network time protocol daemon. + +It also contains tools to manage encrypted home areas and secrets bound to the +machine, and to create or grow partitions and make file systems automatically. + + + tpm2-tss + 3.2.0 + 1.fc37 + x86_64 + https://github.com/tpm2-software/tpm2-tss + TPM2.0 Software Stack + tpm2-tss is a software stack supporting Trusted Platform Module(TPM) 2.0 system +APIs. It sits between TPM driver and applications, providing TPM2.0 specified +APIs for applications to access TPM module through kernel TPM drivers. + + + tzdata + 2022a + 1.fc37 + noarch + https://www.iana.org/time-zones + Timezone data + This package contains data files with rules for various timezones around +the world. + + + util-linux + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + Collection of basic system utilities + The util-linux package contains a large variety of low-level system +utilities that are necessary for a Linux system to function. Among +others, util-linux contains the fdisk configuration tool and the login +program. + + + util-linux-core + 2.38 + 3.fc37 + x86_64 + https://en.wikipedia.org/wiki/Util-linux + The most essential utilities from the util-linux suite + This is a very basic set of Linux utilities that is necessary on +minimal installations. + + + whois-nls + 5.5.13 + 1.fc37 + noarch + http://www.linux.it/~md/software/ + Gettext catalogs for whois tools + whois tools messages translated into different natural languages. + + + xkeyboard-config + 2.35.1 + 1.fc37 + noarch + http://www.freedesktop.org/wiki/Software/XKeyboardConfig + X Keyboard Extension configuration data + This package contains configuration data used by the X Keyboard Extension (XKB), +which allows selection of keyboard layouts when using a graphical interface. + + + xz + 5.2.5 + 9.fc37 + x86_64 + https://tukaani.org/xz/ + LZMA compression utilities + XZ Utils are an attempt to make LZMA compression easy to use on free (as in +freedom) operating systems. This is achieved by providing tools and libraries +which are similar to use than the equivalents of the most popular existing +compression algorithms. + +LZMA is a general purpose compression algorithm designed by Igor Pavlov as +part of 7-Zip. It provides high compression ratio while keeping the +decompression speed fast. + + + xz-libs + 5.2.5 + 9.fc37 + x86_64 + https://tukaani.org/xz/ + Libraries for decoding LZMA compression + Libraries for decoding files compressed with LZMA or XZ utils. + + + zlib + 1.2.11 + 31.fc36 + x86_64 + https://www.zlib.net/ + Compression and decompression library + Zlib is a general-purpose, patent-free, lossless data compression +library which is used by many different programs. diff --git a/inspector/inspector.c b/inspector/inspector.c index 25ee40f..73357c7 100644 --- a/inspector/inspector.c +++ b/inspector/inspector.c @@ -1,5 +1,5 @@ /* virt-inspector - * Copyright (C) 2010-2012 Red Hat Inc. + * Copyright (C) 2010-2023 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 @@ -294,6 +294,9 @@ main (int argc, char *argv[]) */ add_drives (drvs); + if (key_store_requires_network (ks) && guestfs_set_network (g, 1) == -1) + exit (EXIT_FAILURE); + if (guestfs_launch (g) == -1) exit (EXIT_FAILURE); @@ -444,6 +447,14 @@ output_root (xmlTextWriterPtr xo, char *root) single_element ("hostname", str); free (str); +#ifdef GUESTFS_HAVE_INSPECT_GET_BUILD_ID + str = guestfs_inspect_get_build_id (g, root); + if (!str) exit (EXIT_FAILURE); + if (STRNEQ (str, "unknown")) + single_element ("build_id", str); + free (str); +#endif + str = guestfs_inspect_get_osinfo (g, root); if (!str) exit (EXIT_FAILURE); if (STRNEQ (str, "unknown")) diff --git a/inspector/test-virt-inspector-luks-on-lvm.sh b/inspector/test-virt-inspector-luks-on-lvm.sh index 334cef4..b998943 100755 --- a/inspector/test-virt-inspector-luks-on-lvm.sh +++ b/inspector/test-virt-inspector-luks-on-lvm.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs virt-inspector test script -# Copyright (C) 2012-2020 Red Hat Inc. +# Copyright (C) 2012-2023 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 diff --git a/inspector/test-virt-inspector-lvm-on-luks.sh b/inspector/test-virt-inspector-lvm-on-luks.sh index 955ac63..32f540e 100755 --- a/inspector/test-virt-inspector-lvm-on-luks.sh +++ b/inspector/test-virt-inspector-lvm-on-luks.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs virt-inspector test script -# Copyright (C) 2012-2020 Red Hat Inc. +# Copyright (C) 2012-2023 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 diff --git a/inspector/test-virt-inspector.sh b/inspector/test-virt-inspector.sh index f9ec7df..ef8f6cd 100755 --- a/inspector/test-virt-inspector.sh +++ b/inspector/test-virt-inspector.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs virt-inspector test script -# Copyright (C) 2012-2020 Red Hat Inc. +# Copyright (C) 2012-2023 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 diff --git a/inspector/test-xmllint.sh b/inspector/test-xmllint.sh index 0d732c9..d31a2a0 100755 --- a/inspector/test-xmllint.sh +++ b/inspector/test-xmllint.sh @@ -1,6 +1,6 @@ #!/bin/bash - # @configure_input@ -# Copyright (C) 2012-2020 Red Hat Inc. +# Copyright (C) 2012-2023 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 diff --git a/inspector/virt-inspector.pod b/inspector/virt-inspector.pod index d5261e8..f6f43cb 100644 --- a/inspector/virt-inspector.pod +++ b/inspector/virt-inspector.pod @@ -49,6 +49,9 @@ L). The same information can also be fetched using guestfish or via libguestfs bindings in many programming languages (see L). +Additional information about bootloader, kernel and drivers inside a +guest can be found using L. + =head1 OPTIONS =over 4 @@ -495,6 +498,7 @@ L, L, L, L, +L, L. =head1 AUTHORS @@ -513,4 +517,4 @@ Matthew Booth L =head1 COPYRIGHT -Copyright (C) 2010-2012 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/inspector/virt-inspector.rng b/inspector/virt-inspector.rng index 5b460b3..29c5798 100644 --- a/inspector/virt-inspector.rng +++ b/inspector/virt-inspector.rng @@ -38,6 +38,7 @@ + diff --git a/lib/guestfs-internal-all.h b/lib/guestfs-internal-all.h index 090d05c..d4ae035 100644 --- a/lib/guestfs-internal-all.h +++ b/lib/guestfs-internal-all.h @@ -1,5 +1,5 @@ /* libguestfs - * Copyright (C) 2013-2020 Red Hat Inc. + * Copyright (C) 2013-2023 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/m4/guestfs-bash-completion.m4 b/m4/guestfs-bash-completion.m4 index a53188d..4a9c2ee 100644 --- a/m4/guestfs-bash-completion.m4 +++ b/m4/guestfs-bash-completion.m4 @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/m4/guestfs-c.m4 b/m4/guestfs-c.m4 index fb77340..bc7e3b2 100644 --- a/m4/guestfs-c.m4 +++ b/m4/guestfs-c.m4 @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4 index fcc9c39..2d252bf 100644 --- a/m4/guestfs-libraries.m4 +++ b/m4/guestfs-libraries.m4 @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -18,7 +18,13 @@ dnl Any C libraries required by the libguestfs C library (not the daemon). dnl Of course we need libguestfs. -PKG_CHECK_MODULES([LIBGUESTFS], [libguestfs >= 1.44]) +dnl +dnl We need libguestfs 1.49.8 for guestfs_inspect_get_build_id in +dnl virt-drivers. +PKG_CHECK_MODULES([LIBGUESTFS], [libguestfs >= 1.49.8]) + +dnl Test if it's GNU or XSI strerror_r. +AC_FUNC_STRERROR_R dnl Define a C symbol for the host CPU architecture. AC_DEFINE_UNQUOTED([host_cpu],["$host_cpu"],[Host architecture.]) @@ -27,13 +33,14 @@ dnl Headers. AC_CHECK_HEADERS([\ byteswap.h \ endian.h \ - sys/endian.h \ + error.h \ errno.h \ linux/fs.h \ linux/magic.h \ linux/raid/md_u.h \ linux/rtc.h \ printf.h \ + sys/endian.h \ sys/inotify.h \ sys/mount.h \ sys/resource.h \ @@ -51,8 +58,10 @@ AC_CHECK_HEADERS([\ dnl Functions. AC_CHECK_FUNCS([\ be32toh \ + error \ fsync \ futimens \ + getprogname \ getxattr \ htonl \ htons \ @@ -157,3 +166,6 @@ LIBS="$old_LIBS" dnl Check for Jansson JSON library (required). PKG_CHECK_MODULES([JANSSON], [jansson >= 2.7]) + +dnl Check for libosinfo (mandatory) +PKG_CHECK_MODULES([LIBOSINFO], [libosinfo-1.0]) diff --git a/m4/guestfs-misc-libraries.m4 b/m4/guestfs-misc-libraries.m4 index c122654..f723646 100644 --- a/m4/guestfs-misc-libraries.m4 +++ b/m4/guestfs-misc-libraries.m4 @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/m4/guestfs-ocaml-gettext.m4 b/m4/guestfs-ocaml-gettext.m4 index ad1ca0d..bb044e7 100644 --- a/m4/guestfs-ocaml-gettext.m4 +++ b/m4/guestfs-ocaml-gettext.m4 @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4 index 8791ac6..d2bf400 100644 --- a/m4/guestfs-ocaml.m4 +++ b/m4/guestfs-ocaml.m4 @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/m4/guestfs-perl.m4 b/m4/guestfs-perl.m4 index c8337ed..9361a32 100644 --- a/m4/guestfs-perl.m4 +++ b/m4/guestfs-perl.m4 @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/m4/guestfs-progs.m4 b/m4/guestfs-progs.m4 index 74467d2..dc78cca 100644 --- a/m4/guestfs-progs.m4 +++ b/m4/guestfs-progs.m4 @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2021 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -39,6 +39,11 @@ AC_PROG_AWK AC_PROG_LN_S +dnl Check for realpath (used by ocaml-dep.sh for basic builds). +AC_CHECK_PROGS([REALPATH],[grealpath realpath],[no]) +test "x$REALPATH" = "xno" && + AC_MSG_ERROR([GNU realpath program must be installed]) + dnl Check for xorriso/genisoimage/mkisofs. AC_PATH_PROGS([MKISOFS],[xorrisofs genisoimage mkisofs],[no], [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin]) diff --git a/m4/libtool.m4 b/m4/libtool.m4 index e3adeda..a644432 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1,7 +1,6 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # -# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software -# Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -32,7 +31,7 @@ m4_define([_LT_COPYING], [dnl # along with this program. If not, see . ]) -# serial 59 LT_INIT +# serial 58 LT_INIT # LT_PREREQ(VERSION) @@ -182,7 +181,6 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl @@ -221,8 +219,8 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC and -# ICC, which need '.lib'). +# All known linkers require a '.a' archive for static linking (except MSVC, +# which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld @@ -780,7 +778,7 @@ _LT_EOF # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - $SED '$q' "$ltmain" >> "$cfgfile" \ + sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || @@ -1044,8 +1042,8 @@ int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF @@ -1069,12 +1067,17 @@ _LT_EOF _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) - case $MACOSX_DEPLOYMENT_TARGET,$host in - 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - *) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + 10.[[012]][[,.]]*) + _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac @@ -1123,12 +1126,12 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" - _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" - _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" + _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else @@ -1242,8 +1245,7 @@ _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], -[m4_require([_LT_DECL_SED])dnl -AC_MSG_CHECKING([for sysroot]) +[AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot @@ -1260,7 +1262,7 @@ case $with_sysroot in #( fi ;; #( /*) - lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( @@ -1290,7 +1292,7 @@ ia64-*-hpux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; @@ -1307,7 +1309,7 @@ ia64-*-hpux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; @@ -1319,7 +1321,7 @@ ia64-*-hpux*) ;; esac else - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; @@ -1341,7 +1343,7 @@ mips64*-*linux*) echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; @@ -1349,7 +1351,7 @@ mips64*-*linux*) emul="${emul}64" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; @@ -1357,7 +1359,7 @@ mips64*-*linux*) emul="${emul}ltsmip" ;; esac - case `$FILECMD conftest.$ac_objext` in + case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; @@ -1377,14 +1379,14 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; @@ -1452,7 +1454,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then - case `$FILECMD conftest.o` in + case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) @@ -1491,22 +1493,9 @@ need_locks=$enable_libtool_lock m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} +: ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) - -# Use ARFLAGS variable as AR's operation code to sync the variable naming with -# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have -# higher priority because thats what people were doing historically (setting -# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS -# variable obsoleted/removed. - -test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} -lt_ar_flags=$AR_FLAGS -_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) - -# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override -# by AR_FLAGS because that was never working and AR_FLAGS is about to die. -_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], - [Flags to create an archive]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no @@ -1725,7 +1714,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) + bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -1768,7 +1757,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` + lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi @@ -2218,35 +2207,26 @@ m4_defun([_LT_CMD_STRIPLIB], striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -z "$STRIP"; then - AC_MSG_RESULT([no]) +if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) else - if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - case $host_os in - darwin*) - # FIXME - insert some real tests, host_os isn't really good enough +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) - ;; - freebsd*) - if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then - old_striplib="$STRIP --strip-debug" - striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) + else AC_MSG_RESULT([no]) - ;; - esac - fi + fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) @@ -2569,7 +2549,7 @@ cygwin* | mingw* | pw32* | cegcc*) case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; @@ -2579,14 +2559,14 @@ m4_if([$1], [],[ ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' + library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; - *,cl* | *,icl*) - # Native MSVC or ICC + *,cl*) + # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' @@ -2605,7 +2585,7 @@ m4_if([$1], [],[ done IFS=$lt_save_ifs # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form @@ -2642,7 +2622,7 @@ m4_if([$1], [],[ ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; @@ -2675,7 +2655,7 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then @@ -3477,7 +3457,7 @@ beos*) bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='$FILECMD -L' + lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; @@ -3511,14 +3491,14 @@ darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; -freebsd* | dragonfly* | midnightbsd*) +freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac @@ -3532,7 +3512,7 @@ haiku*) ;; hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' @@ -3579,7 +3559,7 @@ netbsd*) newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=$FILECMD + lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; @@ -3706,13 +3686,13 @@ else mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac - case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in + case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) - case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 @@ -3738,7 +3718,7 @@ else # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in + case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; @@ -3978,7 +3958,7 @@ esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" + lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" @@ -3996,20 +3976,20 @@ fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ +lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ @@ -4033,7 +4013,7 @@ for ac_symprfx in "" "_"; do if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. - # Also find C++ and __fastcall symbols from MSVC++ or ICC, + # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ @@ -4051,9 +4031,9 @@ for ac_symprfx in "" "_"; do " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else - lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -4340,7 +4320,7 @@ m4_if([$1], [CXX], [ ;; esac ;; - freebsd* | dragonfly* | midnightbsd*) + freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4423,7 +4403,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4759,7 +4739,7 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' @@ -4942,7 +4922,7 @@ m4_if([$1], [CXX], [ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) @@ -4950,7 +4930,7 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl* | icl*) + cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) @@ -5007,15 +4987,15 @@ dnl Note also adjust exclude_expsyms for C++ above. case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time + # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) + # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) @@ -5067,7 +5047,7 @@ dnl Note also adjust exclude_expsyms for C++ above. _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... @@ -5179,7 +5159,6 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) @@ -5194,7 +5173,7 @@ _LT_EOF # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) @@ -5237,7 +5216,7 @@ _LT_EOF _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes @@ -5249,7 +5228,7 @@ _LT_EOF if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi @@ -5265,7 +5244,7 @@ _LT_EOF _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi @@ -5397,7 +5376,7 @@ _LT_EOF if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else - _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no @@ -5580,12 +5559,12 @@ _LT_EOF cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using - # Microsoft Visual C++ or Intel C++ Compiler. + # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in - cl* | icl*) - # Native MSVC or ICC + cl*) + # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes @@ -5626,7 +5605,7 @@ _LT_EOF fi' ;; *) - # Assume MSVC and ICC wrapper + # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. @@ -5674,7 +5653,7 @@ _LT_EOF ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly* | midnightbsd*) + freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes @@ -5885,7 +5864,6 @@ _LT_EOF emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) @@ -6656,8 +6634,8 @@ if test yes != "$_lt_caught_CXX_error"; then cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in - ,cl* | no,cl* | ,icl* | no,icl*) - # Native MSVC or ICC + ,cl* | no,cl*) + # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' @@ -6755,7 +6733,6 @@ if test yes != "$_lt_caught_CXX_error"; then emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) @@ -6786,7 +6763,7 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd* | dragonfly* | midnightbsd*) + freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes @@ -6923,7 +6900,7 @@ if test yes != "$_lt_caught_CXX_error"; then # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in @@ -7063,13 +7040,13 @@ if test yes != "$_lt_caught_CXX_error"; then _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ + cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) - case `$CC -V 2>&1 | $SED 5q` in + case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -8215,14 +8192,6 @@ _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) -# _LT_DECL_FILECMD -# ---------------- -# Check for a file(cmd) program that can be used to detect file type and magic -m4_defun([_LT_DECL_FILECMD], -[AC_CHECK_TOOL([FILECMD], [file], [:]) -_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) -])# _LD_DECL_FILECMD - # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4 index b0b5e9c..94b0829 100644 --- a/m4/ltoptions.m4 +++ b/m4/ltoptions.m4 @@ -1,7 +1,7 @@ # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free -# Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4 index 902508b..48bc934 100644 --- a/m4/ltsugar.m4 +++ b/m4/ltsugar.m4 @@ -1,6 +1,6 @@ # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software +# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # diff --git a/m4/ltversion.m4 b/m4/ltversion.m4 index b155d0a..fa04b52 100644 --- a/m4/ltversion.m4 +++ b/m4/ltversion.m4 @@ -1,7 +1,6 @@ # ltversion.m4 -- version numbers -*- Autoconf -*- # -# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, -# Inc. +# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives @@ -10,15 +9,15 @@ # @configure_input@ -# serial 4245 ltversion.m4 +# serial 4179 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4.7]) -m4_define([LT_PACKAGE_REVISION], [2.4.7]) +m4_define([LT_PACKAGE_VERSION], [2.4.6]) +m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4.7' -macro_revision='2.4.7' +[macro_version='2.4.6' +macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4 index 0f7a875..c6b26f8 100644 --- a/m4/lt~obsolete.m4 +++ b/m4/lt~obsolete.m4 @@ -1,7 +1,7 @@ # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free -# Software Foundation, Inc. +# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software +# Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives diff --git a/make-fs/Makefile.am b/make-fs/Makefile.am index d4217db..70d8386 100644 --- a/make-fs/Makefile.am +++ b/make-fs/Makefile.am @@ -1,5 +1,5 @@ # libguestfs virt-diff -# Copyright (C) 2010-2020 Red Hat Inc. +# Copyright (C) 2010-2023 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 diff --git a/make-fs/Makefile.in b/make-fs/Makefile.in index cdfdba3..30a884e 100644 --- a/make-fs/Makefile.in +++ b/make-fs/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs virt-diff -# Copyright (C) 2010-2020 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -488,7 +488,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -517,6 +516,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -587,6 +588,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c index efbb028..7837b61 100644 --- a/make-fs/make-fs.c +++ b/make-fs/make-fs.c @@ -1,5 +1,5 @@ /* virt-make-fs - * Copyright (C) 2010-2020 Red Hat Inc. + * Copyright (C) 2010-2023 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 @@ -83,7 +83,7 @@ usage (int status) getprogname ()); else { printf (_("%s: make a filesystem from a tar archive or files\n" - "Copyright (C) 2010-2020 Red Hat Inc.\n" + "Copyright (C) 2010-2023 Red Hat Inc.\n" "Usage:\n" " %s [--options] input.tar output.img\n" " %s [--options] input.tar.gz output.img\n" diff --git a/make-fs/test-virt-make-fs.sh b/make-fs/test-virt-make-fs.sh index 95122b7..2435155 100755 --- a/make-fs/test-virt-make-fs.sh +++ b/make-fs/test-virt-make-fs.sh @@ -1,6 +1,6 @@ #!/bin/bash - # libguestfs -# Copyright (C) 2010-2020 Red Hat Inc. +# Copyright (C) 2010-2023 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 diff --git a/make-fs/virt-make-fs.pod b/make-fs/virt-make-fs.pod index 54823c0..442df5b 100644 --- a/make-fs/virt-make-fs.pod +++ b/make-fs/virt-make-fs.pod @@ -242,4 +242,4 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2010-2020 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/ocaml-dep.sh.in b/ocaml-dep.sh.in index eaa219d..a97403e 100755 --- a/ocaml-dep.sh.in +++ b/ocaml-dep.sh.in @@ -1,5 +1,5 @@ #!/bin/bash - -# (C) Copyright 2009-2020 Red Hat Inc. +# (C) Copyright 2009-2023 Red Hat Inc. # @configure_input@ # # This program is free software; you can redistribute it and/or modify @@ -33,7 +33,7 @@ set -e # directories must have unique names (eg. not ‘Utils’) else # dependencies don't get built right. include_dirs=" -bundled/ocaml-augeas +common/mldrivers common/mlgettext common/mlpcre common/mlprogress @@ -49,10 +49,10 @@ ocaml # Output file is always created in the current directory. output=.depend -subdir=$(realpath --relative-to=@abs_top_builddir@ .) -srcdir=$(realpath --relative-to=. @abs_top_srcdir@/${subdir}) -srcdir_re=$(realpath --relative-to=. @abs_top_srcdir@/${subdir} | sed 's/\./[.]/g') -top_builddir=$(realpath --relative-to=. @abs_top_builddir@) +subdir=$(@REALPATH@ --relative-to=@abs_top_builddir@ .) +srcdir=$(@REALPATH@ --relative-to=. @abs_top_srcdir@/${subdir}) +srcdir_re=$(@REALPATH@ --relative-to=. @abs_top_srcdir@/${subdir} | sed 's/\./[.]/g') +top_builddir=$(@REALPATH@ --relative-to=. @abs_top_builddir@) includes="-I @abs_top_srcdir@/$subdir -I @abs_top_builddir@/$subdir" for i in $include_dirs; do diff --git a/ocaml-link.sh.in b/ocaml-link.sh.in index 8f77dc2..e5d3c60 100755 --- a/ocaml-link.sh.in +++ b/ocaml-link.sh.in @@ -1,7 +1,7 @@ #!/bin/bash - # Script used to link OCaml programs. # @configure_input@ -# (C) Copyright 2015-2020 Red Hat Inc. +# (C) Copyright 2015-2023 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 diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am index ca8da70..800c258 100644 --- a/po-docs/Makefile.am +++ b/po-docs/Makefile.am @@ -1,5 +1,5 @@ # libguestfs translations of man pages and POD files -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 diff --git a/po-docs/Makefile.in b/po-docs/Makefile.in index 5fa2fd8..12f4614 100644 --- a/po-docs/Makefile.in +++ b/po-docs/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs translations of man pages and POD files -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -276,7 +276,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -305,6 +304,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -375,6 +376,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/po-docs/ja/Makefile.am b/po-docs/ja/Makefile.am index a6ebec2..2c804de 100644 --- a/po-docs/ja/Makefile.am +++ b/po-docs/ja/Makefile.am @@ -1,5 +1,5 @@ # libguestfs translations of man pages and POD files -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 diff --git a/po-docs/ja/Makefile.in b/po-docs/ja/Makefile.in index b977842..3ac74e3 100644 --- a/po-docs/ja/Makefile.in +++ b/po-docs/ja/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs translations of man pages and POD files -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -37,7 +37,7 @@ # All the actual logic should be in language.mk. # libguestfs translations of man pages and POD files -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -56,7 +56,7 @@ # Common logic for generating translated documentation. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -242,7 +242,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -271,6 +270,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -341,6 +342,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/po-docs/ja/customize-options.pod b/po-docs/ja/customize-options.pod index c852704..39e53b4 100644 --- a/po-docs/ja/customize-options.pod +++ b/po-docs/ja/customize-options.pod @@ -7,7 +7,7 @@ libguestfs generated file and from the code in the generator/ subdirectory. ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. - Copyright (C) 2009-2020 Red Hat Inc. + Copyright (C) 2009-2023 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 @@ -138,6 +138,38 @@ For an overview on the different ways to install packages, see L. You can use a dotted hostname.domainname (FQDN) if you want. +=item B<--inject-qemu-ga> METHOD + +Inject the QEMU Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see L). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. + +The parameter is the same as used by the I<--inject-virtio-win> operation. + +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the L tool instead of this. + +=item B<--inject-virtio-win> METHOD + +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. + +The parameter can be one of: + +=over 4 + +=item ISO + +The path to the ISO image containing the virtio-win drivers (eg. F). + +=item DIR + +The directory containing the unpacked virtio-win drivers (eg. F). + +=item B<"osinfo"> + +The literal string C<"osinfo"> means to use the libosinfo database to locate the drivers. (See L. + +=back + +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the L tool instead of this. + =item B<--install> PKG,PKG.. Install the named packages (a comma-separated list). These are installed during the image build using the guest’s package manager (eg. apt, yum, etc.) and the host’s network connection. @@ -168,6 +200,14 @@ Scrub C (log file from build commands) from the image after buildin See also: L. +=item B<--no-selinux-relabel> + +Do not attempt to correct the SELinux labels of files in the guest. + +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch F on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. + +The option is a no-op for guests that do not support SELinux. + =item B<--password> USER:SELECTOR Set the password for C. (Note this option does I create the user account). @@ -234,11 +274,7 @@ It cannot delete directories, only regular files. =item B<--selinux-relabel> -Relabel files in the guest so that they have the correct SELinux label. - -This will attempt to relabel files immediately, but if the operation fails this will instead touch F on the image to schedule a relabel operation for the next time the image boots. - -You should only use this option for guests which support SELinux. +This is a compatibility option that does nothing. =item B<--sm-attach> SELECTOR diff --git a/po-docs/ja/guestfs-tools-release-notes-1.48.pod b/po-docs/ja/guestfs-tools-release-notes-1.48.pod index a6a36ae..27b00a3 100644 --- a/po-docs/ja/guestfs-tools-release-notes-1.48.pod +++ b/po-docs/ja/guestfs-tools-release-notes-1.48.pod @@ -111,5 +111,5 @@ git shortlog -s v1.46.0.. =head1 COPYRIGHT -Copyright (C) 2009-2022 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/ja/guestfs-tools-release-notes-1.50.pod b/po-docs/ja/guestfs-tools-release-notes-1.50.pod new file mode 100644 index 0000000..ca49c8b --- /dev/null +++ b/po-docs/ja/guestfs-tools-release-notes-1.50.pod @@ -0,0 +1,163 @@ + +=head1 名前 + +guestfs-tools-release-notes - guestfs tools release Notes + +=head1 RELEASE NOTES FOR GUESTFS TOOLS 1.50 + +These are the release notes for guestfs tools stable release 1.50. This describes the major changes since 1.48. + +Guestfs tools 1.50.0 was released on B<7 February 2023>. + +=head2 Security + +=over 4 + +=item CVE-2022-2211 + +L + +A buffer overflow was found in the I<--key> option of several guestfs tools. For more information on this low severity bug see the bug report above (Laszlo Ersek). + +=back + +=head2 New virt-drivers tool + +This new tool can examine a disk image to determine: + +=over 4 + +=item * + +Whether it uses BIOS or UEFI for booting + +=item * + +What bootloader it uses (Linux only) + +=item * + +What kernels may be chosen at boot time (Linux only) + +=item * + +What device drivers (kernel modules) are installed + +=back + +This is useful for determining how (or if) a guest can boot on a virtualization hypervisor. + +=head2 virt-customize + +I<--selinux-relabel> is now the default for SELinux guests. You no longer need to specify this flag. In the rare case where you don't want to relabel a guest after customizing it, you can use I<--no-selinux-relabel>. Note this is not needed for non-SELinux guests, it will do the right thing automatically (Laszlo Ersek). + +New I<--inject-qemu-ga> and I<--inject-virtio-win> operations which respectively inject QEMU Guest Agent and virtio-win drivers into Windows guests. + +Rocky Linux guests are now supported (thanks Harry Benson). + +=head2 virt-inspector + +Virt-inspector now outputs the new Ebuild_idE element containing the guest build ID, if using libguestfs E 1.50. + +=head2 virt-sysprep + +New C operation for removing LVM2's F file. This avoids certain problems when cloning a VM (Laszlo Ersek). + +Virt-sysprep supports guests using LUKS logical volumes on top of LVM (Laszlo Ersek). + +=head2 Common changes + +All the tools supporting the I<--key> option can now use Clevis/Tang to decrypt full disk encryption using this network-based scheme (Laszlo Ersek). + +=head2 Build changes + +B that libguestfs now requires minimum OCaml 4.04. It will not compile on RHEL 6. + +B that libosinfo is a new required dependency. + +OCaml 4.14 is now supported. + +C<./configure --disable-ocaml> and C<./configure --disable-perl> now disable the OCaml- and Perl-based tools respectively (thanks Simon Walter). + +Experimental support for compiling on macOS. + +When running C, Valgrind logs are no longer written to separate files under F. Instead the output is written to the normal F.log> file. + +=begin コメント + +=head2 内部 + +=end コメント + +=head2 バグ修正 + +=begin コメント + +https_proxy= ./bugs-in-changelog.sh v1.48.0.. + +=end コメント + +=over 4 + +=item L + +RFE: Support Rocky Linux in virt-customize + +=item L + +virt-sysprep: make an effort to support LUKS on LV + +=item L + +Removal of "--selinux-relabel" option breaks existing scripts + +=item L + +Having to use "--selinux-relabel" is not intuitive given Red Hat products default to selinux enabled. + +=item L + +[RFE] Request to add lvm system.devices cleanup operation to virt-sysprep + +=item L + +[RHEL 9.0][Nutanix] lvm partition "home" will lost with SCSI disk either in the new cloned VM or restored from a snapshot + +=item L + +Install the qemu-guest-agent package during the conversion process + +=item L + +[RFE] Add support for LUKS encrypted disks with Clevis & Tang + +=item L + +RFE: customize --selinux-relabel should be the default, with --no-selinux-relabel used to opt out + +=back + +=head1 関連項目 + +L + +=head1 著者 + +=begin コメント + +git shortlog -s v1.48.0.. + +=end コメント + +=over 4 + +=item Laszlo Ersek + +=item Richard W.M. Jones + +=back + +=head1 COPYRIGHT + +Copyright (C) 2009-2023 Red Hat Inc. + diff --git a/po-docs/ja/key-option.pod b/po-docs/ja/key-option.pod index d22bcce..8912448 100644 --- a/po-docs/ja/key-option.pod +++ b/po-docs/ja/key-option.pod @@ -13,5 +13,11 @@ Use the specified C as passphrase. Read the passphrase from F. +=item B<--key> C:clevis + +Attempt passphrase-less unlocking for C with Clevis, over the network. Please refer to L for more information on network-bound disk encryption (NBDE). + +Note that if any such option is present on the command line, QEMU user networking will be automatically enabled for the libguestfs appliance. + =back diff --git a/po-docs/ja/sysprep-extra-options.pod b/po-docs/ja/sysprep-extra-options.pod index 3f0429b..9f074c5 100644 --- a/po-docs/ja/sysprep-extra-options.pod +++ b/po-docs/ja/sysprep-extra-options.pod @@ -110,6 +110,38 @@ For an overview on the different ways to install packages, see L. You can use a dotted hostname.domainname (FQDN) if you want. +=item B<--inject-qemu-ga> METHOD (see C below) + +Inject the QEMU Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see L). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. + +The parameter is the same as used by the I<--inject-virtio-win> operation. + +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the L tool instead of this. + +=item B<--inject-virtio-win> METHOD (see C below) + +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. + +The parameter can be one of: + +=over 4 + +=item ISO + +The path to the ISO image containing the virtio-win drivers (eg. F). + +=item DIR + +The directory containing the unpacked virtio-win drivers (eg. F). + +=item B<"osinfo"> + +The literal string C<"osinfo"> means to use the libosinfo database to locate the drivers. (See L. + +=back + +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the L tool instead of this. + =item B<--install> PKG,PKG.. (see C below) Install the named packages (a comma-separated list). These are installed during the image build using the guest’s package manager (eg. apt, yum, etc.) and the host’s network connection. @@ -150,6 +182,14 @@ Scrub C (log file from build commands) from the image after buildin See also: L. +=item B<--no-selinux-relabel> (see C below) + +Do not attempt to correct the SELinux labels of files in the guest. + +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch F on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. + +The option is a no-op for guests that do not support SELinux. + =item B<--password> USER:SELECTOR (see C below) Set the password for C. (Note this option does I create the user account). @@ -240,11 +280,7 @@ It cannot delete directories, only regular files. =item B<--selinux-relabel> (see C below) -Relabel files in the guest so that they have the correct SELinux label. - -This will attempt to relabel files immediately, but if the operation fails this will instead touch F on the image to schedule a relabel operation for the next time the image boots. - -You should only use this option for guests which support SELinux. +This is a compatibility option that does nothing. =item B<--sm-attach> SELECTOR (see C below) diff --git a/po-docs/ja/sysprep-operations.pod b/po-docs/ja/sysprep-operations.pod index 6d8f7b9..979728a 100644 --- a/po-docs/ja/sysprep-operations.pod +++ b/po-docs/ja/sysprep-operations.pod @@ -429,6 +429,12 @@ Linux においては以下のファイルが削除されます: =back +=head2 B * + +Remove LVM2 system.devices file. + +On Linux guests, LVM2's scanning for physical volumes (PVs) may be restricted to those block devices whose WWIDs are listed in C. When cloning VMs, WWIDs may change, breaking C. Remove C. + =head2 B * LVM2 の PV および VG の UUID を変更します。 diff --git a/po-docs/ja/virt-alignment-scan.1 b/po-docs/ja/virt-alignment-scan.1 index 95d72ad..57d3893 100644 --- a/po-docs/ja/virt-alignment-scan.1 +++ b/po-docs/ja/virt-alignment-scan.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-alignment-scan 1" -.TH virt-alignment-scan 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-alignment-scan 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po-docs/ja/virt-builder-repository.pod b/po-docs/ja/virt-builder-repository.pod index 32f6dbc..92c59fc 100644 --- a/po-docs/ja/virt-builder-repository.pod +++ b/po-docs/ja/virt-builder-repository.pod @@ -163,5 +163,5 @@ Cédric Bosdonnat L =head1 COPYRIGHT -Copyright (C) 2016-2020 SUSE Inc. +Copyright (C) 2016-2023 SUSE Inc. diff --git a/po-docs/ja/virt-builder.1 b/po-docs/ja/virt-builder.1 index c64ca52..c0c2b21 100644 --- a/po-docs/ja/virt-builder.1 +++ b/po-docs/ja/virt-builder.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-builder 1" -.TH virt-builder 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-builder 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -193,12 +193,6 @@ To update the installed packages to the latest version: .Vb 1 \& virt\-builder debian\-7 \-\-update .Ve -.PP -For guests which use SELinux, like Fedora and Red Hat Enterprise Linux, you may need to do SELinux relabelling after installing or updating packages (see \*(L"\s-1SELINUX\*(R"\s0 below): -.PP -.Vb 1 -\& virt\-builder fedora\-27 \-\-update \-\-selinux\-relabel -.Ve .SS "Customizing the installation" .IX Subsection "Customizing the installation" There are many options that let you customize the installation. These include: \fI\-\-run\fR/\fI\-\-run\-command\fR, which run a shell script or command while the disk image is being generated and lets you add or edit files that go into the disk image. \fI\-\-firstboot\fR/\fI\-\-firstboot\-command\fR, which let you add scripts/commands that are run the first time the guest boots. \fI\-\-edit\fR to edit files. \fI\-\-upload\fR to upload files. @@ -618,6 +612,34 @@ For an overview on the different ways to install packages, see \*(L"\s-1INSTALLI .IP "\fB\-\-hostname\fR \s-1HOSTNAME\s0" 4 .IX Item "--hostname HOSTNAME" Set the hostname of the guest to \f(CW\*(C`HOSTNAME\*(C'\fR. You can use a dotted hostname.domainname (\s-1FQDN\s0) if you want. +.IP "\fB\-\-inject\-qemu\-ga\fR \s-1METHOD\s0" 4 +.IX Item "--inject-qemu-ga METHOD" +Inject the \s-1QEMU\s0 Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see \fBqemu\-ga\fR\|(8)). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. +.Sp +The parameter is the same as used by the \fI\-\-inject\-virtio\-win\fR operation. +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.IP "\fB\-\-inject\-virtio\-win\fR \s-1METHOD\s0" 4 +.IX Item "--inject-virtio-win METHOD" +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. +.Sp +The parameter can be one of: +.RS 4 +.IP "\s-1ISO\s0" 4 +.IX Item "ISO" +The path to the \s-1ISO\s0 image containing the virtio-win drivers (eg. \fI/usr/share/virtio\-win/virtio\-win.iso\fR). +.IP "\s-1DIR\s0" 4 +.IX Item "DIR" +The directory containing the unpacked virtio-win drivers (eg. \fI/usr/share/virtio\-win\fR). +.ie n .IP "\fB""osinfo""\fR" 4 +.el .IP "\fB``osinfo''\fR" 4 +.IX Item "osinfo" +The literal string \f(CW"osinfo"\fR means to use the libosinfo database to locate the drivers. (See \fBosinfo\-query\fR\|(1). +.RE +.RS 4 +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.RE .IP "\fB\-\-install\fR \s-1PKG,PKG..\s0" 4 .IX Item "--install PKG,PKG.." Install the named packages (a comma-separated list). These are installed during the image build using the guest’s package manager (eg. apt, yum, etc.) and the host’s network connection. @@ -643,6 +665,13 @@ Wildcards cannot be used. Scrub \f(CW\*(C`builder.log\*(C'\fR (log file from build commands) from the image after building is complete. If you don't want to reveal precisely how the image was built, use this option. .Sp See also: \*(L"\s-1LOG FILE\*(R"\s0. +.IP "\fB\-\-no\-selinux\-relabel\fR" 4 +.IX Item "--no-selinux-relabel" +Do not attempt to correct the SELinux labels of files in the guest. +.Sp +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch \fI/.autorelabel\fR on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. +.Sp +The option is a no-op for guests that do not support SELinux. .IP "\fB\-\-password\fR \s-1USER:SELECTOR\s0" 4 .IX Item "--password USER:SELECTOR" Set the password for \f(CW\*(C`USER\*(C'\fR. (Note this option does \fInot\fR create the user account). @@ -699,11 +728,7 @@ It cannot delete directories, only regular files. .RE .IP "\fB\-\-selinux\-relabel\fR" 4 .IX Item "--selinux-relabel" -Relabel files in the guest so that they have the correct SELinux label. -.Sp -This will attempt to relabel files immediately, but if the operation fails this will instead touch \fI/.autorelabel\fR on the image to schedule a relabel operation for the next time the image boots. -.Sp -You should only use this option for guests which support SELinux. +This is a compatibility option that does nothing. .IP "\fB\-\-sm\-attach\fR \s-1SELECTOR\s0" 4 .IX Item "--sm-attach SELECTOR" Attach to a pool using \f(CW\*(C`subscription\-manager\*(C'\fR. @@ -1073,7 +1098,7 @@ A new random seed is generated for the guest. .IP "\(bu" 4 Guest customization is performed, in the order specified on the command line. .IP "\(bu" 4 -SELinux relabelling is done (\fI\-\-selinux\-relabel\fR). +SELinux relabelling is done unless disabled with \fI\-\-no\-selinux\-relabel\fR. .SS "\s-1IMPORTING THE DISK IMAGE\s0" .IX Subsection "IMPORTING THE DISK IMAGE" \fIImporting into libvirt\fR @@ -1148,15 +1173,14 @@ To enable the Puppet agent in a guest, install the package, point the configurat .PP A typical virt-builder command would be: .PP -.Vb 8 +.Vb 7 \& virt\-builder fedora\-27 \e \& \-\-hostname client.example.com \e \& \-\-update \e \& \-\-install puppet \e \& \-\-append\-line \*(Aq/etc/puppet/puppet.conf:[agent]\*(Aq \e \& \-\-append\-line \*(Aq/etc/puppet/puppet.conf:server = puppetmaster.example.com/\*(Aq \e -\& \-\-run\-command \*(Aqsystemctl enable puppet\*(Aq \e -\& \-\-selinux\-relabel +\& \-\-run\-command \*(Aqsystemctl enable puppet\*(Aq .Ve .PP The precise instructions vary according to the Linux distro. For further information see: https://docs.puppet.com/puppet/latest/install_pre.html @@ -1672,18 +1696,16 @@ Virt-builder uses an internal implementation of pxzcat (parallel xzcat) if liblz Guests which use SELinux (such as Fedora and Red Hat Enterprise Linux) require that each file has a correct SELinux label. .PP Virt-builder does not know how to give new files a label, so there are two possible strategies it can use to ensure correct labelling: -.IP "Using \fI\-\-selinux\-relabel\fR" 4 -.IX Item "Using --selinux-relabel" +.IP "Automatic relabeling" 4 +.IX Item "Automatic relabeling" This runs \fBsetfiles\fR\|(8) just before finalizing the guest, which sets SELinux labels correctly in the disk image. .Sp This is the recommended method. -.IP "\fI\-\-touch\fR \fI/.autorelabel\fR" 4 -.IX Item "--touch /.autorelabel" +.IP "Using \fI\-\-no\-selinux\-relabel\fR \fI\-\-touch\fR \fI/.autorelabel\fR" 4 +.IX Item "Using --no-selinux-relabel --touch /.autorelabel" Guest templates may already contain a file called \fI/.autorelabel\fR or you may touch it. .Sp For guests that use SELinux, this causes \fBrestorecon\fR\|(8) to run at first boot. Guests will reboot themselves once the first time you use them, which is normal and harmless. -.PP -Please note that if your guest uses SELinux, and you are doing operations on it which might create new files or change existing ones, you are recommended to use \fI\-\-selinux\-relabel\fR. This will help in making sure that files have the right SELinux labels. .SH "マシン可読な出力" .IX Header "マシン可読な出力" The \fI\-\-machine\-readable\fR option can be used to make the output more machine friendly, which is useful when calling virt-builder from other programs, GUIs etc. diff --git a/po-docs/ja/virt-builder.pod b/po-docs/ja/virt-builder.pod index 12360a0..0deaaef 100644 --- a/po-docs/ja/virt-builder.pod +++ b/po-docs/ja/virt-builder.pod @@ -106,10 +106,6 @@ To update the installed packages to the latest version: virt-builder debian-7 --update -For guests which use SELinux, like Fedora and Red Hat Enterprise Linux, you may need to do SELinux relabelling after installing or updating packages (see L below): - - virt-builder fedora-27 --update --selinux-relabel - =head2 Customizing the installation There are many options that let you customize the installation. These include: I<--run>/I<--run-command>, which run a shell script or command while the disk image is being generated and lets you add or edit files that go into the disk image. I<--firstboot>/I<--firstboot-command>, which let you add scripts/commands that are run the first time the guest boots. I<--edit> to edit files. I<--upload> to upload files. @@ -762,7 +758,7 @@ Guest customization is performed, in the order specified on the command line. =item * -SELinux relabelling is done (I<--selinux-relabel>). +SELinux relabelling is done unless disabled with I<--no-selinux-relabel>. =back @@ -843,8 +839,7 @@ A typical virt-builder command would be: --install puppet \ --append-line '/etc/puppet/puppet.conf:[agent]' \ --append-line '/etc/puppet/puppet.conf:server = puppetmaster.example.com/' \ - --run-command 'systemctl enable puppet' \ - --selinux-relabel + --run-command 'systemctl enable puppet' The precise instructions vary according to the Linux distro. For further information see: L @@ -1347,13 +1342,13 @@ Virt-builder does not know how to give new files a label, so there are two possi =over 4 -=item Using I<--selinux-relabel> +=item Automatic relabeling This runs L just before finalizing the guest, which sets SELinux labels correctly in the disk image. This is the recommended method. -=item I<--touch> F +=item Using I<--no-selinux-relabel> I<--touch> F Guest templates may already contain a file called F or you may touch it. @@ -1361,8 +1356,6 @@ For guests that use SELinux, this causes L to run at first boot. =back -Please note that if your guest uses SELinux, and you are doing operations on it which might create new files or change existing ones, you are recommended to use I<--selinux-relabel>. This will help in making sure that files have the right SELinux labels. - =head1 マシン可読な出力 The I<--machine-readable> option can be used to make the output more machine friendly, which is useful when calling virt-builder from other programs, GUIs etc. diff --git a/po-docs/ja/virt-cat.1 b/po-docs/ja/virt-cat.1 index 806c52f..5c3706b 100644 --- a/po-docs/ja/virt-cat.1 +++ b/po-docs/ja/virt-cat.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-cat 1" -.TH virt-cat 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-cat 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -218,6 +218,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -337,7 +346,7 @@ where \fIdisk.img\fR is the disk image, \fI/dev/sda1\fR is the filesystem within Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2010\-2012 Red Hat Inc. +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-cat.pod b/po-docs/ja/virt-cat.pod index e74e6e7..5e27940 100644 --- a/po-docs/ja/virt-cat.pod +++ b/po-docs/ja/virt-cat.pod @@ -231,5 +231,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2010-2012 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-customize.1 b/po-docs/ja/virt-customize.1 index 4910081..ccf3c15 100644 --- a/po-docs/ja/virt-customize.1 +++ b/po-docs/ja/virt-customize.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-customize 1" -.TH virt-customize 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-customize 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -209,6 +209,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -407,6 +416,34 @@ For an overview on the different ways to install packages, see \*(L"\s-1INSTALLI .IP "\fB\-\-hostname\fR \s-1HOSTNAME\s0" 4 .IX Item "--hostname HOSTNAME" Set the hostname of the guest to \f(CW\*(C`HOSTNAME\*(C'\fR. You can use a dotted hostname.domainname (\s-1FQDN\s0) if you want. +.IP "\fB\-\-inject\-qemu\-ga\fR \s-1METHOD\s0" 4 +.IX Item "--inject-qemu-ga METHOD" +Inject the \s-1QEMU\s0 Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see \fBqemu\-ga\fR\|(8)). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. +.Sp +The parameter is the same as used by the \fI\-\-inject\-virtio\-win\fR operation. +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.IP "\fB\-\-inject\-virtio\-win\fR \s-1METHOD\s0" 4 +.IX Item "--inject-virtio-win METHOD" +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. +.Sp +The parameter can be one of: +.RS 4 +.IP "\s-1ISO\s0" 4 +.IX Item "ISO" +The path to the \s-1ISO\s0 image containing the virtio-win drivers (eg. \fI/usr/share/virtio\-win/virtio\-win.iso\fR). +.IP "\s-1DIR\s0" 4 +.IX Item "DIR" +The directory containing the unpacked virtio-win drivers (eg. \fI/usr/share/virtio\-win\fR). +.ie n .IP "\fB""osinfo""\fR" 4 +.el .IP "\fB``osinfo''\fR" 4 +.IX Item "osinfo" +The literal string \f(CW"osinfo"\fR means to use the libosinfo database to locate the drivers. (See \fBosinfo\-query\fR\|(1). +.RE +.RS 4 +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.RE .IP "\fB\-\-install\fR \s-1PKG,PKG..\s0" 4 .IX Item "--install PKG,PKG.." Install the named packages (a comma-separated list). These are installed during the image build using the guest’s package manager (eg. apt, yum, etc.) and the host’s network connection. @@ -432,6 +469,13 @@ Wildcards cannot be used. Scrub \f(CW\*(C`builder.log\*(C'\fR (log file from build commands) from the image after building is complete. If you don't want to reveal precisely how the image was built, use this option. .Sp See also: \*(L"\s-1LOG FILE\*(R"\s0. +.IP "\fB\-\-no\-selinux\-relabel\fR" 4 +.IX Item "--no-selinux-relabel" +Do not attempt to correct the SELinux labels of files in the guest. +.Sp +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch \fI/.autorelabel\fR on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. +.Sp +The option is a no-op for guests that do not support SELinux. .IP "\fB\-\-password\fR \s-1USER:SELECTOR\s0" 4 .IX Item "--password USER:SELECTOR" Set the password for \f(CW\*(C`USER\*(C'\fR. (Note this option does \fInot\fR create the user account). @@ -488,11 +532,7 @@ It cannot delete directories, only regular files. .RE .IP "\fB\-\-selinux\-relabel\fR" 4 .IX Item "--selinux-relabel" -Relabel files in the guest so that they have the correct SELinux label. -.Sp -This will attempt to relabel files immediately, but if the operation fails this will instead touch \fI/.autorelabel\fR on the image to schedule a relabel operation for the next time the image boots. -.Sp -You should only use this option for guests which support SELinux. +This is a compatibility option that does nothing. .IP "\fB\-\-sm\-attach\fR \s-1SELECTOR\s0" 4 .IX Item "--sm-attach SELECTOR" Attach to a pool using \f(CW\*(C`subscription\-manager\*(C'\fR. @@ -595,7 +635,7 @@ This is a Windows binary shipped with \s-1SUSE VMDP,\s0 used to install a \*(L"f Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2011\-2020 Red Hat Inc. +Copyright (C) 2011\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it diff --git a/po-docs/ja/virt-customize.pod b/po-docs/ja/virt-customize.pod index a017be1..bb78840 100644 --- a/po-docs/ja/virt-customize.pod +++ b/po-docs/ja/virt-customize.pod @@ -249,5 +249,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2011-2020 Red Hat Inc. +Copyright (C) 2011-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-df.1 b/po-docs/ja/virt-df.1 index dd92db5..613f9c0 100644 --- a/po-docs/ja/virt-df.1 +++ b/po-docs/ja/virt-df.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-df 1" -.TH virt-df 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-df 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -309,13 +309,13 @@ Most spreadsheets and databases can import \s-1CSV\s0 directly. このプログラムは、成功すると 0 を、エラーがあると 0 以外を返します。 .SH "関連項目" .IX Header "関連項目" -\&\fBdf\fR\|(1), \fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBvirt\-filesystems\fR\|(1), http://libguestfs.org/. +\&\fBdf\fR\|(1), \fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBvirt\-drivers\fR\|(1), \fBvirt\-filesystems\fR\|(1), http://libguestfs.org/. .SH "著者" .IX Header "著者" Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2009\-2020 Red Hat Inc. +Copyright (C) 2009\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-df.pod b/po-docs/ja/virt-df.pod index 34fb105..417df9b 100644 --- a/po-docs/ja/virt-df.pod +++ b/po-docs/ja/virt-df.pod @@ -211,7 +211,7 @@ Most spreadsheets and databases can import CSV directly. =head1 関連項目 -L, L, L, L, L. +L, L, L, L, L, L. =head1 著者 @@ -219,5 +219,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-dib.1 b/po-docs/ja/virt-dib.1 index a30994d..5eed017 100644 --- a/po-docs/ja/virt-dib.1 +++ b/po-docs/ja/virt-dib.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-dib 1" -.TH virt-dib 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-dib 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po-docs/ja/virt-diff.1 b/po-docs/ja/virt-diff.1 index 90da57f..65fa8fc 100644 --- a/po-docs/ja/virt-diff.1 +++ b/po-docs/ja/virt-diff.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-diff 1" -.TH virt-diff 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-diff 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -237,6 +237,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -317,7 +326,7 @@ Most spreadsheets and databases can import \s-1CSV\s0 directly. Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2009\-2020 Red Hat Inc. +Copyright (C) 2009\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-diff.pod b/po-docs/ja/virt-diff.pod index e6e0bd1..f0cdd9c 100644 --- a/po-docs/ja/virt-diff.pod +++ b/po-docs/ja/virt-diff.pod @@ -212,5 +212,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-drivers.pod b/po-docs/ja/virt-drivers.pod new file mode 100644 index 0000000..054cc18 --- /dev/null +++ b/po-docs/ja/virt-drivers.pod @@ -0,0 +1,205 @@ + +=head1 名前 + +virt-drivers - Detect bootloader, kernel and drivers inside guest + +=head1 書式 + + virt-drivers [--options] -d domname + + virt-drivers [--options] -a disk.img + +=head1 説明 + +This tool can detect the bootloader, kernel and drivers inside some guests from only the disk image. It can detect, for example, whether a disk image needs BIOS or UEFI to boot, and whether it supports virtio or requires slower emulated devices. + +=head2 Notes + +Normally you should distribute hypervisor metadata (eg. libvirt XML or OVF) alongside disk images to tell the hypervisor how to boot them. This tool is used when this metadata has not been provided. Work with the supplier of the disk image to get them to provide proper metadata. + +=head1 XML フォーマット + +The output is an XML document. At the top level it lists the operating systems found (the same as L): + + + + /dev/sda2 + linux + x86_64 + fedora + ... + + + /dev/sdb1 + ... + + + +=head2 EfirmwareE + +The EfirmwareE element lists the firmware which is required to boot the guest. For UEFI it will additionally show the EFI system partition ("ESP"). Guests may support multiple boot firmwares. For example this guest is detected as using UEFI boot, and the UEFI ESP is the first partition of the first disk: + + + /dev/sda1 + + ... + +=head2 EbootloaderE and EkernelE + +The EbootloaderE element shows the bootloader found in the Linux guest. If known, this may contain information about what Linux kernels are provided. For example: + + + + + /dev/sda2 + linux + ... + + + kernel + 6.1.0-0.rc6.46.fc38.x86_64 + /boot/vmlinuz-6.1.0-0.rc6.46.fc38.x86_64 + + ... + + + + ... + + + +Many more fields are usually available for Linux guests, including a complete list of kernel modules and information about support for virtio. For a complete example see: L + +=head2 EdriversE + +The EdriversE element lists information about drivers found in Windows guests: + + + + + /dev/sda2 + windows + ... + + + scsidev + + + + ... + + +The driver name (eg. C) corresponds to the Windows driver F<.INF> file (eg. F). The list of PCI, USB etc devices are the matching devices which would cause this driver to load at boot. + +=head1 オプション + +=over 4 + +=item B<--help> + +ヘルプを表示します。 + +=item B<-a> file + +=item B<--add> file + +仮想マシンからディスクイメージの I を追加します。 + +ディスクイメージの形式は自動的に検出されます。強制的に特定の形式を使用するには I<--format> オプションを使用します。 + +=item B<-a> URI + +=item B<--add> URI + +Add a remote disk. The URI format is compatible with guestfish. See L. + +=item B<--blocksize> B<512> + +=item B<--blocksize> B<4096> + +This parameter sets the sector size of the disk image added with I<-a> option and is ignored for libvirt guest added with I<-d> option. See also L. + +=item B<--colors> + +=item B<--colours> + +Use ANSI colour sequences to colourize messages. This is the default when the output is a tty. If the output of the program is redirected to a file, ANSI colour sequences are disabled unless you use this option. + +=item B<-c> URI + +=item B<--connect> URI + +libvirt を使用していると、指定された I に接続します。 省略すると、デフォルトの libvirt ハイパーバイザーに接続します。 + +ゲストのブロックデバイスを直接指定していると((I<-a>))、libvirt は何も使用されません。 + +=item B<-d> guest + +=item B<--domain> guest + +名前付きの libvirt 仮想マシンからすべてのディスクを追加します。 名前の代わりに仮想マシンの UUID を使用できます。 + +=item B<--echo-keys> + +When prompting for keys and passphrases, virt-get-kernel normally turns echoing off so you cannot see what you are typing. If you are not worried about Tempest attacks and there is no one else in the room you can specify this flag to see what you are typing. + +=item B<--format> raw|qcow2|.. + +=item B<--format> auto + +The default for the I<-a> option is to auto-detect the format of the disk image. Using this forces the disk format for the I<-a> option on the command line. + +仮想マシンのディスクイメージが信頼できない raw 形式である場合、 ディスク形式を指定するためにこのオプションを使用すべきです。 これにより、悪意のある仮想マシンにより起こり得る セキュリティ問題を回避できます (CVE-2010-3851)。 + +__INCLUDE:key-option.pod__ + +__INCLUDE:keys-from-stdin-option.pod__ + +=item B<-q> + +=item B<--quiet> + +Don’t print ordinary progress messages. + +=item B<-v> + +=item B<--verbose> + +デバッグ用の冗長なメッセージを有効にします。 + +=item B<-V> + +=item B<--version> + +バージョン番号を表示して、終了します。 + +=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> + +libguestfs API 呼び出しのトレースを有効にします。 + +=back + +=head1 環境変数 + +For other environment variables which affect all libguestfs programs, see L. + +=head1 終了ステータス + +このプログラムは、成功すると 0 を、エラーがあると 0 以外を返します。 + +=head1 関連項目 + +L, L, L, L, L, L, L. + +=head1 著者 + +Richard W.M. Jones L + +=head1 COPYRIGHT + +Copyright (C) 2009-2023 Red Hat Inc. + diff --git a/po-docs/ja/virt-edit.1 b/po-docs/ja/virt-edit.1 index 53ca885..1c10c5d 100644 --- a/po-docs/ja/virt-edit.1 +++ b/po-docs/ja/virt-edit.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-edit 1" -.TH virt-edit 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-edit 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -246,6 +246,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -423,7 +432,7 @@ where \fIdisk.img\fR is the disk image, \fI/dev/sda1\fR is the filesystem within Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2009\-2020 Red Hat Inc. +Copyright (C) 2009\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-edit.pod b/po-docs/ja/virt-edit.pod index 076b13b..a0108bf 100644 --- a/po-docs/ja/virt-edit.pod +++ b/po-docs/ja/virt-edit.pod @@ -307,5 +307,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-filesystems.1 b/po-docs/ja/virt-filesystems.1 index fca1e7d..c4c1553 100644 --- a/po-docs/ja/virt-filesystems.1 +++ b/po-docs/ja/virt-filesystems.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-filesystems 1" -.TH virt-filesystems 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-filesystems 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -413,13 +413,13 @@ Most spreadsheets and databases can import \s-1CSV\s0 directly. このプログラムは、成功すると 0 を、エラーがあると 0 以外を返します。 .SH "関連項目" .IX Header "関連項目" -\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBvirt\-cat\fR\|(1), \fBvirt\-df\fR\|(1), \fBvirt\-list\-filesystems\fR\|(1), \fBvirt\-list\-partitions\fR\|(1), \fBcsvtool\fR\|(1), http://libguestfs.org/. +\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBvirt\-cat\fR\|(1), \fBvirt\-df\fR\|(1), \fBvirt\-drivers\fR\|(1), \fBvirt\-list\-filesystems\fR\|(1), \fBvirt\-list\-partitions\fR\|(1), \fBcsvtool\fR\|(1), http://libguestfs.org/. .SH "著者" .IX Header "著者" Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2010\-2012 Red Hat Inc. +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-filesystems.pod b/po-docs/ja/virt-filesystems.pod index fa200c8..be5da0c 100644 --- a/po-docs/ja/virt-filesystems.pod +++ b/po-docs/ja/virt-filesystems.pod @@ -313,7 +313,7 @@ Most spreadsheets and databases can import CSV directly. =head1 関連項目 -L, L, L, L, L, L, L, L. +L, L, L, L, L, L, L, L, L. =head1 著者 @@ -321,5 +321,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2010-2012 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-format.1 b/po-docs/ja/virt-format.1 index 209c73f..4e6c1b0 100644 --- a/po-docs/ja/virt-format.1 +++ b/po-docs/ja/virt-format.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-format 1" -.TH virt-format 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-format 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po-docs/ja/virt-get-kernel.1 b/po-docs/ja/virt-get-kernel.1 index be20b98..07df4e7 100644 --- a/po-docs/ja/virt-get-kernel.1 +++ b/po-docs/ja/virt-get-kernel.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-get-kernel 1" -.TH virt-get-kernel 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-get-kernel 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -88,7 +88,7 @@ virt-get-kernel \- Extract kernel and ramdisk from guests .Ve .SH "説明" .IX Header "説明" -This option extracts the kernel and initramfs from a guest. +This program extracts the kernel and initramfs from a guest. .PP The format of the disk image is automatically detected unless you specify it by using the \fI\-\-format\fR option. .PP @@ -170,6 +170,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -259,13 +268,13 @@ For other environment variables which affect all libguestfs programs, see \*(L"\ このプログラムは、成功すると 0 を、エラーがあると 0 以外を返します。 .SH "関連項目" .IX Header "関連項目" -\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBguestmount\fR\|(1), \fBvirt\-copy\-out\fR\|(1), http://libguestfs.org/. +\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBguestmount\fR\|(1), \fBvirt\-copy\-out\fR\|(1), \fBvirt\-drivers\fR\|(1), http://libguestfs.org/. .SH "著者" .IX Header "著者" Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2013\-2020 Red Hat Inc. +Copyright (C) 2013\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-get-kernel.pod b/po-docs/ja/virt-get-kernel.pod index 501db19..5a26f1a 100644 --- a/po-docs/ja/virt-get-kernel.pod +++ b/po-docs/ja/virt-get-kernel.pod @@ -11,7 +11,7 @@ virt-get-kernel - Extract kernel and ramdisk from guests =head1 説明 -This option extracts the kernel and initramfs from a guest. +This program extracts the kernel and initramfs from a guest. The format of the disk image is automatically detected unless you specify it by using the I<--format> option. @@ -162,7 +162,7 @@ For other environment variables which affect all libguestfs programs, see L, L, L, L, L. +L, L, L, L, L, L. =head1 著者 @@ -170,5 +170,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2013-2020 Red Hat Inc. +Copyright (C) 2013-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-index-validate.1 b/po-docs/ja/virt-index-validate.1 index 4c91394..20c997b 100644 --- a/po-docs/ja/virt-index-validate.1 +++ b/po-docs/ja/virt-index-validate.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-index-validate 1" -.TH virt-index-validate 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-index-validate 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po-docs/ja/virt-inspector.1 b/po-docs/ja/virt-inspector.1 index 28703ab..260eefa 100644 --- a/po-docs/ja/virt-inspector.1 +++ b/po-docs/ja/virt-inspector.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-inspector 1" -.TH virt-inspector 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-inspector 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -111,6 +111,8 @@ Virt-inspector can only inspect and report upon \fIone domain at a time\fR. To Because virt-inspector needs direct access to guest images, it won’t normally work over remote libvirt connections. .PP All of the information available from virt-inspector is also available through the core libguestfs inspection \s-1API\s0 (see \*(L"\s-1INSPECTION\*(R"\s0 in \fBguestfs\fR\|(3)). The same information can also be fetched using guestfish or via libguestfs bindings in many programming languages (see \*(L"\s-1GETTING INSPECTION DATA FROM THE LIBGUESTFS API\*(R"\s0). +.PP +Additional information about bootloader, kernel and drivers inside a guest can be found using \fBvirt\-drivers\fR\|(1). .SH "オプション" .IX Header "オプション" .IP "\fB\-\-help\fR" 4 @@ -189,6 +191,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -493,7 +504,7 @@ As described above, early versions of libguestfs shipped with a different virt-i このプログラムは、成功すると 0 を、エラーがあると 0 以外を返します。 .SH "関連項目" .IX Header "関連項目" -\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), http://www.w3.org/TR/xpath/, \fBbase64\fR\|(1), \fBxmlstarlet\fR\|(1), http://libguestfs.org/. +\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), http://www.w3.org/TR/xpath/, \fBbase64\fR\|(1), \fBxmlstarlet\fR\|(1), \fBvirt\-drivers\fR\|(1), http://libguestfs.org/. .SH "著者" .IX Header "著者" .IP "\(bu" 4 @@ -502,7 +513,7 @@ Richard W.M. Jones http://people.redhat.com/~rjones/ Matthew Booth mbooth@redhat.com .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2010\-2012 Red Hat Inc. +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-inspector.pod b/po-docs/ja/virt-inspector.pod index d9539cb..dc7f555 100644 --- a/po-docs/ja/virt-inspector.pod +++ b/po-docs/ja/virt-inspector.pod @@ -33,6 +33,8 @@ Because virt-inspector needs direct access to guest images, it won’t normally All of the information available from virt-inspector is also available through the core libguestfs inspection API (see L). The same information can also be fetched using guestfish or via libguestfs bindings in many programming languages (see L). +Additional information about bootloader, kernel and drivers inside a guest can be found using L. + =head1 オプション =over 4 @@ -368,7 +370,7 @@ As described above, early versions of libguestfs shipped with a different virt-i =head1 関連項目 -L, L, L, L, L, L. +L, L, L, L, L, L, L. =head1 著者 @@ -386,5 +388,5 @@ Matthew Booth L =head1 COPYRIGHT -Copyright (C) 2010-2012 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-log.1 b/po-docs/ja/virt-log.1 index 3564363..4e02ecb 100644 --- a/po-docs/ja/virt-log.1 +++ b/po-docs/ja/virt-log.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-log 1" -.TH virt-log 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-log 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -196,6 +196,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -234,7 +243,7 @@ libguestfs \s-1API\s0 呼び出しのトレースを有効にします。 Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2010\-2020 Red Hat Inc. +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-log.pod b/po-docs/ja/virt-log.pod index 1373d5f..0e55847 100644 --- a/po-docs/ja/virt-log.pod +++ b/po-docs/ja/virt-log.pod @@ -123,5 +123,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2010-2020 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-ls.1 b/po-docs/ja/virt-ls.1 index eae6811..1aa3ad9 100644 --- a/po-docs/ja/virt-ls.1 +++ b/po-docs/ja/virt-ls.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-ls 1" -.TH virt-ls 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-ls 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -389,6 +389,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -533,7 +542,7 @@ Most spreadsheets and databases can import \s-1CSV\s0 directly. Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2009\-2020 Red Hat Inc. +Copyright (C) 2009\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-ls.pod b/po-docs/ja/virt-ls.pod index 1629f2d..a78ae42 100644 --- a/po-docs/ja/virt-ls.pod +++ b/po-docs/ja/virt-ls.pod @@ -429,5 +429,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-make-fs.1 b/po-docs/ja/virt-make-fs.1 index 881e321..318a119 100644 --- a/po-docs/ja/virt-make-fs.1 +++ b/po-docs/ja/virt-make-fs.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-make-fs 1" -.TH virt-make-fs 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-make-fs 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -255,7 +255,7 @@ Enable libguestfs trace. Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2010\-2020 Red Hat Inc. +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-make-fs.pod b/po-docs/ja/virt-make-fs.pod index 13bb855..92490f9 100644 --- a/po-docs/ja/virt-make-fs.pod +++ b/po-docs/ja/virt-make-fs.pod @@ -179,5 +179,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2010-2020 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-resize.1 b/po-docs/ja/virt-resize.1 index 02b5440..bef0c94 100644 --- a/po-docs/ja/virt-resize.1 +++ b/po-docs/ja/virt-resize.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-resize 1" -.TH virt-resize 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-resize 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -656,7 +656,7 @@ There are several proprietary tools for resizing partitions. We won't mention a Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2010\-2012 Red Hat Inc. +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-resize.pod b/po-docs/ja/virt-resize.pod index 0b5fff6..0ed66e1 100644 --- a/po-docs/ja/virt-resize.pod +++ b/po-docs/ja/virt-resize.pod @@ -617,5 +617,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2010-2012 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-sparsify.1 b/po-docs/ja/virt-sparsify.1 index a348cf5..7ffa202 100644 --- a/po-docs/ja/virt-sparsify.1 +++ b/po-docs/ja/virt-sparsify.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-sparsify 1" -.TH virt-sparsify 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-sparsify 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -261,6 +261,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -438,7 +447,7 @@ If the exit code is \f(CW3\fR and the \fI\-\-in\-place\fR option was used, that Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2011\-2020 Red Hat Inc. +Copyright (C) 2011\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/ja/virt-sparsify.pod b/po-docs/ja/virt-sparsify.pod index 9d19640..47109f5 100644 --- a/po-docs/ja/virt-sparsify.pod +++ b/po-docs/ja/virt-sparsify.pod @@ -376,5 +376,5 @@ Richard W.M. Jones L =head1 COPYRIGHT -Copyright (C) 2011-2020 Red Hat Inc. +Copyright (C) 2011-2023 Red Hat Inc. diff --git a/po-docs/ja/virt-sysprep.1 b/po-docs/ja/virt-sysprep.1 index 75fe444..d1d182b 100644 --- a/po-docs/ja/virt-sysprep.1 +++ b/po-docs/ja/virt-sysprep.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-sysprep 1" -.TH virt-sysprep 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-sysprep 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -234,6 +234,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -444,6 +453,36 @@ For an overview on the different ways to install packages, see \*(L"\s-1INSTALLI .el .IP "\fB\-\-hostname\fR \s-1HOSTNAME\s0 (see \f(CWcustomize\fR below)" 4 .IX Item "--hostname HOSTNAME (see customize below)" Set the hostname of the guest to \f(CW\*(C`HOSTNAME\*(C'\fR. You can use a dotted hostname.domainname (\s-1FQDN\s0) if you want. +.ie n .IP "\fB\-\-inject\-qemu\-ga\fR \s-1METHOD\s0 (see ""customize"" below)" 4 +.el .IP "\fB\-\-inject\-qemu\-ga\fR \s-1METHOD\s0 (see \f(CWcustomize\fR below)" 4 +.IX Item "--inject-qemu-ga METHOD (see customize below)" +Inject the \s-1QEMU\s0 Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see \fBqemu\-ga\fR\|(8)). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. +.Sp +The parameter is the same as used by the \fI\-\-inject\-virtio\-win\fR operation. +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.ie n .IP "\fB\-\-inject\-virtio\-win\fR \s-1METHOD\s0 (see ""customize"" below)" 4 +.el .IP "\fB\-\-inject\-virtio\-win\fR \s-1METHOD\s0 (see \f(CWcustomize\fR below)" 4 +.IX Item "--inject-virtio-win METHOD (see customize below)" +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. +.Sp +The parameter can be one of: +.RS 4 +.IP "\s-1ISO\s0" 4 +.IX Item "ISO" +The path to the \s-1ISO\s0 image containing the virtio-win drivers (eg. \fI/usr/share/virtio\-win/virtio\-win.iso\fR). +.IP "\s-1DIR\s0" 4 +.IX Item "DIR" +The directory containing the unpacked virtio-win drivers (eg. \fI/usr/share/virtio\-win\fR). +.ie n .IP "\fB""osinfo""\fR" 4 +.el .IP "\fB``osinfo''\fR" 4 +.IX Item "osinfo" +The literal string \f(CW"osinfo"\fR means to use the libosinfo database to locate the drivers. (See \fBosinfo\-query\fR\|(1). +.RE +.RS 4 +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.RE .ie n .IP "\fB\-\-install\fR \s-1PKG,PKG..\s0 (see ""customize"" below)" 4 .el .IP "\fB\-\-install\fR \s-1PKG,PKG..\s0 (see \f(CWcustomize\fR below)" 4 .IX Item "--install PKG,PKG.. (see customize below)" @@ -486,6 +525,14 @@ Wildcards cannot be used. Scrub \f(CW\*(C`builder.log\*(C'\fR (log file from build commands) from the image after building is complete. If you don't want to reveal precisely how the image was built, use this option. .Sp See also: \*(L"\s-1LOG FILE\*(R"\s0. +.ie n .IP "\fB\-\-no\-selinux\-relabel\fR (see ""customize"" below)" 4 +.el .IP "\fB\-\-no\-selinux\-relabel\fR (see \f(CWcustomize\fR below)" 4 +.IX Item "--no-selinux-relabel (see customize below)" +Do not attempt to correct the SELinux labels of files in the guest. +.Sp +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch \fI/.autorelabel\fR on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. +.Sp +The option is a no-op for guests that do not support SELinux. .ie n .IP "\fB\-\-password\fR \s-1USER:SELECTOR\s0 (see ""customize"" below)" 4 .el .IP "\fB\-\-password\fR \s-1USER:SELECTOR\s0 (see \f(CWcustomize\fR below)" 4 .IX Item "--password USER:SELECTOR (see customize below)" @@ -575,11 +622,7 @@ It cannot delete directories, only regular files. .ie n .IP "\fB\-\-selinux\-relabel\fR (see ""customize"" below)" 4 .el .IP "\fB\-\-selinux\-relabel\fR (see \f(CWcustomize\fR below)" 4 .IX Item "--selinux-relabel (see customize below)" -Relabel files in the guest so that they have the correct SELinux label. -.Sp -This will attempt to relabel files immediately, but if the operation fails this will instead touch \fI/.autorelabel\fR on the image to schedule a relabel operation for the next time the image boots. -.Sp -You should only use this option for guests which support SELinux. +This is a compatibility option that does nothing. .ie n .IP "\fB\-\-sm\-attach\fR \s-1SELECTOR\s0 (see ""customize"" below)" 4 .el .IP "\fB\-\-sm\-attach\fR \s-1SELECTOR\s0 (see \f(CWcustomize\fR below)" 4 .IX Item "--sm-attach SELECTOR (see customize below)" @@ -919,6 +962,11 @@ Linux においては以下のファイルが削除されます: /var/log/xferlog* .IP "·" 4 /var/named/data/named.run +.SS "\fBlvm-system-devices\fP *" +.IX Subsection "lvm-system-devices *" +Remove \s-1LVM2\s0 system.devices file. +.PP +On Linux guests, \s-1LVM2\s0's scanning for physical volumes (PVs) may be restricted to those block devices whose WWIDs are listed in \f(CW\*(C`/etc/lvm/devices/system.devices\*(C'\fR. When cloning VMs, WWIDs may change, breaking \f(CW\*(C`lvm pvscan\*(C'\fR. Remove \f(CW\*(C`/etc/lvm/devices/system.devices\*(C'\fR. .SS "\fBlvm-uuids\fP *" .IX Subsection "lvm-uuids *" \&\s-1LVM2\s0 の \s-1PV\s0 および \s-1VG\s0 の \s-1UUID\s0 を変更します。 @@ -1212,6 +1260,8 @@ On the other hand if you need to make adjustments to the guest filesystem (eg. c Either or both options can be used multiple times on the command line. .SH "セキュリティ" .IX Header "セキュリティ" +Virtual machines that employ full disk encryption \fIinternally to the guest\fR should not be considered for cloning and distribution, as it provides multiple parties with the same internal volume key, enabling any one such party to decrypt all the other clones. Refer to the \s-1LUKS FAQ\s0 for details. +.PP Although virt-sysprep removes some sensitive information from the guest, it does not pretend to remove all of it. You should examine the \*(L"\s-1OPERATIONS\*(R"\s0 above and the guest afterwards. .PP Sensitive files are simply removed. The data they contained may still exist on the disk, easily recovered with a hex editor or undelete tool. The \fI\-\-scrub\fR option can be used to scrub files instead of just deleting them. \fBvirt\-sparsify\fR\|(1) is another way to remove this content. See also the \fBscrub\fR\|(1) command to get rid of deleted content in directory entries and inodes. @@ -1274,7 +1324,7 @@ Richard W.M. Jones http://people.redhat.com/~rjones/ Wanlong Gao, Fujitsu Ltd. .SH "COPYRIGHT" .IX Header "COPYRIGHT" -Copyright (C) 2011\-2020 Red Hat Inc. +Copyright (C) 2011\-2023 Red Hat Inc. .PP Copyright (C) 2012 Fujitsu Ltd. .SH "LICENSE" diff --git a/po-docs/ja/virt-sysprep.pod b/po-docs/ja/virt-sysprep.pod index f762c28..8148fa2 100644 --- a/po-docs/ja/virt-sysprep.pod +++ b/po-docs/ja/virt-sysprep.pod @@ -402,6 +402,8 @@ Either or both options can be used multiple times on the command line. =head1 セキュリティ +Virtual machines that employ full disk encryption I should not be considered for cloning and distribution, as it provides multiple parties with the same internal volume key, enabling any one such party to decrypt all the other clones. Refer to the L for details. + Although virt-sysprep removes some sensitive information from the guest, it does not pretend to remove all of it. You should examine the L above and the guest afterwards. Sensitive files are simply removed. The data they contained may still exist on the disk, easily recovered with a hex editor or undelete tool. The I<--scrub> option can be used to scrub files instead of just deleting them. L is another way to remove this content. See also the L command to get rid of deleted content in directory entries and inodes. @@ -475,7 +477,7 @@ Wanlong Gao, Fujitsu Ltd. =head1 COPYRIGHT -Copyright (C) 2011-2020 Red Hat Inc. +Copyright (C) 2011-2023 Red Hat Inc. Copyright (C) 2012 Fujitsu Ltd. diff --git a/po-docs/ja/virt-win-reg.1 b/po-docs/ja/virt-win-reg.1 index 500be60..9e79174 100644 --- a/po-docs/ja/virt-win-reg.1 +++ b/po-docs/ja/virt-win-reg.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-win-reg 1" -.TH virt-win-reg 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-win-reg 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po-docs/language.mk b/po-docs/language.mk index dd4b454..b4e3544 100644 --- a/po-docs/language.mk +++ b/po-docs/language.mk @@ -1,5 +1,5 @@ # libguestfs translations of man pages and POD files -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 diff --git a/po-docs/podfiles b/po-docs/podfiles index 7166bb8..cc835ef 100644 --- a/po-docs/podfiles +++ b/po-docs/podfiles @@ -17,6 +17,8 @@ df/virt-df.pod dib/virt-dib.pod diff/virt-diff.pod docs/guestfs-tools-release-notes-1.48.pod +docs/guestfs-tools-release-notes-1.50.pod +drivers/virt-drivers.pod edit/virt-edit.pod format/virt-format.pod get-kernel/virt-get-kernel.pod diff --git a/po-docs/uk/Makefile.am b/po-docs/uk/Makefile.am index a6ebec2..2c804de 100644 --- a/po-docs/uk/Makefile.am +++ b/po-docs/uk/Makefile.am @@ -1,5 +1,5 @@ # libguestfs translations of man pages and POD files -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 diff --git a/po-docs/uk/Makefile.in b/po-docs/uk/Makefile.in index 14e617a..8087ff6 100644 --- a/po-docs/uk/Makefile.in +++ b/po-docs/uk/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs translations of man pages and POD files -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -37,7 +37,7 @@ # All the actual logic should be in language.mk. # libguestfs translations of man pages and POD files -# Copyright (C) 2010-2012 Red Hat Inc. +# Copyright (C) 2010-2023 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 @@ -56,7 +56,7 @@ # Common logic for generating translated documentation. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -242,7 +242,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -271,6 +270,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -341,6 +342,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/po-docs/uk/customize-options.pod b/po-docs/uk/customize-options.pod index 0d258c1..594c481 100644 --- a/po-docs/uk/customize-options.pod +++ b/po-docs/uk/customize-options.pod @@ -7,7 +7,7 @@ libguestfs generated file and from the code in the generator/ subdirectory. ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST. - Copyright (C) 2009-2020 Red Hat Inc. + Copyright (C) 2009-2023 Red Hat Inc. Ця програма є вільним програмним забезпеченням; ви можете поширювати та/або змінювати її за умов дотримання GNU General Public License утому вигляді, що @@ -138,6 +138,38 @@ I<Зауваження>: типово C<ПРАВА_ДОСТУПУ> запису Встановити як назву вузла гостьової системи значення C<НАЗВА_ВУЗЛА>. Якщо потрібно, можете скористатися форматом із крапкою, «назва_вузла.назва_домену» (FQDN). +=item B<--inject-qemu-ga> METHOD + +Inject the QEMU Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see L). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. + +The parameter is the same as used by the I<--inject-virtio-win> operation. + +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the L tool instead of this. + +=item B<--inject-virtio-win> METHOD + +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. + +The parameter can be one of: + +=over 4 + +=item ISO + +The path to the ISO image containing the virtio-win drivers (eg. F). + +=item DIR + +The directory containing the unpacked virtio-win drivers (eg. F). + +=item B<"osinfo"> + +The literal string C<"osinfo"> means to use the libosinfo database to locate the drivers. (See L. + +=back + +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the L tool instead of this. + =item B<--install> ПАКУНОК,ПАКУНОК.. Встановити іменовані пакунки (список значень, відокремлених комами). Ці пакунки буде встановлено під час збирання образу за допомогою програми для керування пакунків гостьової системи (наприклад, apt, yum тощо) і з'єднання із мережею основної системи. @@ -168,6 +200,14 @@ I<Зауваження>: типово C<ПРАВА_ДОСТУПУ> запису Див. також L. +=item B<--no-selinux-relabel> + +Do not attempt to correct the SELinux labels of files in the guest. + +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch F on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. + +The option is a no-op for guests that do not support SELinux. + =item B<--password> КОРИСТУВАЧ:ВАРІАНТ Встановити пароль для користувача C<КОРИСТУВАЧ>. (Зауважте, що за допомогою цього параметра I<не можна> створювати облікові записи користувачів.) @@ -234,11 +274,7 @@ C працюватиме з відносно давніми гостьов =item B<--selinux-relabel> -Повторно встановити мітки для файлів у гостьовій системі так, щоб вони були правильними з точки зору SELinux. - -Якщо буде використано цей параметр, програма спробує змінити мітки файлів негайно, але якщо цього зробити не вдасться, вона змінить часову мітку файла F на образі, щоб дію зі зміни міток було заплановано на наступне завантаження образу. - -Вам слід використовувати цей параметр лише для гостьових систем із підтримкою SELinux. +This is a compatibility option that does nothing. =item B<--sm-attach> ВАРІАНТ diff --git a/po-docs/uk/guestfs-tools-release-notes-1.48.pod b/po-docs/uk/guestfs-tools-release-notes-1.48.pod index b2500d4..f946e7d 100644 --- a/po-docs/uk/guestfs-tools-release-notes-1.48.pod +++ b/po-docs/uk/guestfs-tools-release-notes-1.48.pod @@ -111,5 +111,5 @@ git shortlog -s v1.46.0.. =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2009-2022 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/uk/guestfs-tools-release-notes-1.50.pod b/po-docs/uk/guestfs-tools-release-notes-1.50.pod new file mode 100644 index 0000000..c8c1edc --- /dev/null +++ b/po-docs/uk/guestfs-tools-release-notes-1.50.pod @@ -0,0 +1,163 @@ + +=head1 НАЗВА + +guestfs-tools-release-notes - guestfs tools release Notes + +=head1 RELEASE NOTES FOR GUESTFS TOOLS 1.50 + +These are the release notes for guestfs tools stable release 1.50. This describes the major changes since 1.48. + +Guestfs tools 1.50.0 was released on B<7 February 2023>. + +=head2 Безпека + +=over 4 + +=item CVE-2022-2211 + +L + +A buffer overflow was found in the I<--key> option of several guestfs tools. For more information on this low severity bug see the bug report above (Laszlo Ersek). + +=back + +=head2 New virt-drivers tool + +This new tool can examine a disk image to determine: + +=over 4 + +=item * + +Whether it uses BIOS or UEFI for booting + +=item * + +What bootloader it uses (Linux only) + +=item * + +What kernels may be chosen at boot time (Linux only) + +=item * + +What device drivers (kernel modules) are installed + +=back + +This is useful for determining how (or if) a guest can boot on a virtualization hypervisor. + +=head2 virt-customize + +I<--selinux-relabel> is now the default for SELinux guests. You no longer need to specify this flag. In the rare case where you don't want to relabel a guest after customizing it, you can use I<--no-selinux-relabel>. Note this is not needed for non-SELinux guests, it will do the right thing automatically (Laszlo Ersek). + +New I<--inject-qemu-ga> and I<--inject-virtio-win> operations which respectively inject QEMU Guest Agent and virtio-win drivers into Windows guests. + +Rocky Linux guests are now supported (thanks Harry Benson). + +=head2 virt-inspector + +Virt-inspector now outputs the new Ebuild_idE element containing the guest build ID, if using libguestfs E 1.50. + +=head2 virt-sysprep + +New C operation for removing LVM2's F file. This avoids certain problems when cloning a VM (Laszlo Ersek). + +Virt-sysprep supports guests using LUKS logical volumes on top of LVM (Laszlo Ersek). + +=head2 Common changes + +All the tools supporting the I<--key> option can now use Clevis/Tang to decrypt full disk encryption using this network-based scheme (Laszlo Ersek). + +=head2 Зміни у збиранні + +B that libguestfs now requires minimum OCaml 4.04. It will not compile on RHEL 6. + +B that libosinfo is a new required dependency. + +OCaml 4.14 is now supported. + +C<./configure --disable-ocaml> and C<./configure --disable-perl> now disable the OCaml- and Perl-based tools respectively (thanks Simon Walter). + +Experimental support for compiling on macOS. + +When running C, Valgrind logs are no longer written to separate files under F. Instead the output is written to the normal F.log> file. + +=begin коментар + +=head2 Внутрішня частина роботи програми + +=end коментар + +=head2 Виправлені вади + +=begin коментар + +https_proxy= ./bugs-in-changelog.sh v1.48.0.. + +=end коментар + +=over 4 + +=item L + +RFE: Support Rocky Linux in virt-customize + +=item L + +virt-sysprep: make an effort to support LUKS on LV + +=item L + +Removal of "--selinux-relabel" option breaks existing scripts + +=item L + +Having to use "--selinux-relabel" is not intuitive given Red Hat products default to selinux enabled. + +=item L + +[RFE] Request to add lvm system.devices cleanup operation to virt-sysprep + +=item L + +[RHEL 9.0][Nutanix] lvm partition "home" will lost with SCSI disk either in the new cloned VM or restored from a snapshot + +=item L + +Install the qemu-guest-agent package during the conversion process + +=item L + +[RFE] Add support for LUKS encrypted disks with Clevis & Tang + +=item L + +RFE: customize --selinux-relabel should be the default, with --no-selinux-relabel used to opt out + +=back + +=head1 ТАКОЖ ПЕРЕГЛЯНЬТЕ + +L + +=head1 АВТОРИ + +=begin коментар + +git shortlog -s v1.48.0.. + +=end коментар + +=over 4 + +=item Laszlo Ersek + +=item Richard W.M. Jones + +=back + +=head1 АВТОРСЬКІ ПРАВА + +Copyright (C) 2009-2023 Red Hat Inc. + diff --git a/po-docs/uk/key-option.pod b/po-docs/uk/key-option.pod index 4162931..1cf2f0b 100644 --- a/po-docs/uk/key-option.pod +++ b/po-docs/uk/key-option.pod @@ -13,5 +13,11 @@ Specify a key for LUKS, to automatically open a LUKS device when using the inspe Прочитати пароль з файла F<НАЗВА_ФАЙЛА>. +=item B<--key> C:clevis + +Attempt passphrase-less unlocking for C with Clevis, over the network. Please refer to L for more information on network-bound disk encryption (NBDE). + +Note that if any such option is present on the command line, QEMU user networking will be automatically enabled for the libguestfs appliance. + =back diff --git a/po-docs/uk/sysprep-extra-options.pod b/po-docs/uk/sysprep-extra-options.pod index 1f93d7a..8c6ddce 100644 --- a/po-docs/uk/sysprep-extra-options.pod +++ b/po-docs/uk/sysprep-extra-options.pod @@ -110,6 +110,38 @@ I<Зауваження>: типово C<ПРАВА_ДОСТУПУ> запису Встановити як назву вузла гостьової системи значення C<НАЗВА_ВУЗЛА>. Якщо потрібно, можете скористатися форматом із крапкою, «назва_вузла.назва_домену» (FQDN). +=item B<--inject-qemu-ga> METHOD (see C below) + +Inject the QEMU Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see L). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. + +The parameter is the same as used by the I<--inject-virtio-win> operation. + +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the L tool instead of this. + +=item B<--inject-virtio-win> METHOD (see C below) + +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. + +The parameter can be one of: + +=over 4 + +=item ISO + +The path to the ISO image containing the virtio-win drivers (eg. F). + +=item DIR + +The directory containing the unpacked virtio-win drivers (eg. F). + +=item B<"osinfo"> + +The literal string C<"osinfo"> means to use the libosinfo database to locate the drivers. (See L. + +=back + +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the L tool instead of this. + =item B<--install> ПАКУНОК,ПАКУНОК... (див. C нижче) Встановити іменовані пакунки (список значень, відокремлених комами). Ці пакунки буде встановлено під час збирання образу за допомогою програми для керування пакунків гостьової системи (наприклад, apt, yum тощо) і з'єднання із мережею основної системи. @@ -150,6 +182,14 @@ I<Зауваження>: типово C<ПРАВА_ДОСТУПУ> запису Див. також L. +=item B<--no-selinux-relabel> (see C below) + +Do not attempt to correct the SELinux labels of files in the guest. + +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch F on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. + +The option is a no-op for guests that do not support SELinux. + =item B<--password> КОРИСТУВАЧ:ВАРІАНТ (див. C нижче) Встановити пароль для користувача C<КОРИСТУВАЧ>. (Зауважте, що за допомогою цього параметра I<не можна> створювати облікові записи користувачів.) @@ -240,11 +280,7 @@ B<Зауваження:> C B<має> бути вказано повн =item B<--selinux-relabel> (див. C нижче) -Повторно встановити мітки для файлів у гостьовій системі так, щоб вони були правильними з точки зору SELinux. - -Якщо буде використано цей параметр, програма спробує змінити мітки файлів негайно, але якщо цього зробити не вдасться, вона змінить часову мітку файла F на образі, щоб дію зі зміни міток було заплановано на наступне завантаження образу. - -Вам слід використовувати цей параметр лише для гостьових систем із підтримкою SELinux. +This is a compatibility option that does nothing. =item B<--sm-attach> ВАРІАНТ (див. C нижче) diff --git a/po-docs/uk/sysprep-operations.pod b/po-docs/uk/sysprep-operations.pod index f041119..2ee61f7 100644 --- a/po-docs/uk/sysprep-operations.pod +++ b/po-docs/uk/sysprep-operations.pod @@ -429,6 +429,12 @@ Remove the Kerberos host keytab file in the guest. =back +=head2 B * + +Remove LVM2 system.devices file. + +On Linux guests, LVM2's scanning for physical volumes (PVs) may be restricted to those block devices whose WWIDs are listed in C. When cloning VMs, WWIDs may change, breaking C. Remove C. + =head2 B * Змінити UUID ФТ і ГТ LVM2. diff --git a/po-docs/uk/virt-alignment-scan.1 b/po-docs/uk/virt-alignment-scan.1 index 15dc4e9..087c51e 100644 --- a/po-docs/uk/virt-alignment-scan.1 +++ b/po-docs/uk/virt-alignment-scan.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-alignment-scan 1" -.TH virt-alignment-scan 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-alignment-scan 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po-docs/uk/virt-builder-repository.pod b/po-docs/uk/virt-builder-repository.pod index 2c93734..84e8105 100644 --- a/po-docs/uk/virt-builder-repository.pod +++ b/po-docs/uk/virt-builder-repository.pod @@ -163,5 +163,5 @@ Cédric Bosdonnat L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2016-2020 SUSE Inc. +Copyright (C) 2016-2023 SUSE Inc. diff --git a/po-docs/uk/virt-builder.1 b/po-docs/uk/virt-builder.1 index 6826050..22d5a7c 100644 --- a/po-docs/uk/virt-builder.1 +++ b/po-docs/uk/virt-builder.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-builder 1" -.TH virt-builder 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-builder 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -193,12 +193,6 @@ Virt-builder — інструмент для швидкого збирання .Vb 1 \& virt\-builder debian\-7 \-\-update .Ve -.PP -Для гостьових систем, де використовується SELinux, зокрема Fedora і Red Hat Enterprise Linux, може знадобитися зміна міток SELinux після встановлення або оновлення пакунків (див. \*(L"\s-1SELINUX\*(R"\s0 нижче): -.PP -.Vb 1 -\& virt\-builder fedora\-27 \-\-update \-\-selinux\-relabel -.Ve .SS "Налаштовування встановленої системи" .IX Subsection "Налаштовування встановленої системи" Передбачено багато параметрів, за допомогою яких ви можете налаштувати встановлення. Це зокрема параметр \fI\-\-run\fR/\fI\-\-run\-command\fR, за допомогою якого можна виконати скрипт оболонки або команду під час створення образу диска і додати або змінити файли, які буде включено до образу диска. За допомогою параметра \fI\-\-firstboot\fR/\fI\-\-firstboot\-command\fR можна додати скрипти або команди, які буде виконано під час першого завантаження гостьової системи. За допомогою параметра \fI\-\-edit\fR можна редагувати файли, а параметра \fI\-\-upload\fR — вивантажувати файли до образу. @@ -618,6 +612,34 @@ Wrap error, warning, and informative messages. This is the default when the out .IP "\fB\-\-hostname\fR НАЗВА_ВУЗЛА" 4 .IX Item "--hostname НАЗВА_ВУЗЛА" Встановити як назву вузла гостьової системи значення \f(CW\*(C`НАЗВА_ВУЗЛА\*(C'\fR. Якщо потрібно, можете скористатися форматом із крапкою, «назва_вузла.назва_домену» (\s-1FQDN\s0). +.IP "\fB\-\-inject\-qemu\-ga\fR \s-1METHOD\s0" 4 +.IX Item "--inject-qemu-ga METHOD" +Inject the \s-1QEMU\s0 Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see \fBqemu\-ga\fR\|(8)). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. +.Sp +The parameter is the same as used by the \fI\-\-inject\-virtio\-win\fR operation. +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.IP "\fB\-\-inject\-virtio\-win\fR \s-1METHOD\s0" 4 +.IX Item "--inject-virtio-win METHOD" +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. +.Sp +The parameter can be one of: +.RS 4 +.IP "\s-1ISO\s0" 4 +.IX Item "ISO" +The path to the \s-1ISO\s0 image containing the virtio-win drivers (eg. \fI/usr/share/virtio\-win/virtio\-win.iso\fR). +.IP "\s-1DIR\s0" 4 +.IX Item "DIR" +The directory containing the unpacked virtio-win drivers (eg. \fI/usr/share/virtio\-win\fR). +.ie n .IP "\fB""osinfo""\fR" 4 +.el .IP "\fB``osinfo''\fR" 4 +.IX Item "osinfo" +The literal string \f(CW"osinfo"\fR means to use the libosinfo database to locate the drivers. (See \fBosinfo\-query\fR\|(1). +.RE +.RS 4 +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.RE .IP "\fB\-\-install\fR ПАКУНОК,ПАКУНОК.." 4 .IX Item "--install ПАКУНОК,ПАКУНОК.." Встановити іменовані пакунки (список значень, відокремлених комами). Ці пакунки буде встановлено під час збирання образу за допомогою програми для керування пакунків гостьової системи (наприклад, apt, yum тощо) і з'єднання із мережею основної системи. @@ -643,6 +665,13 @@ Wrap error, warning, and informative messages. This is the default when the out Витерти \f(CW\*(C`builder.log\*(C'\fR (файл журналу із командами збирання) з образу після завершення збирання. Якщо ви не хочете явним чином показувати, як було зібрано образ, скористайтеся цим параметром. .Sp Див. також \*(L"\s-1LOG FILE\*(R"\s0. +.IP "\fB\-\-no\-selinux\-relabel\fR" 4 +.IX Item "--no-selinux-relabel" +Do not attempt to correct the SELinux labels of files in the guest. +.Sp +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch \fI/.autorelabel\fR on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. +.Sp +The option is a no-op for guests that do not support SELinux. .IP "\fB\-\-password\fR КОРИСТУВАЧ:ВАРІАНТ" 4 .IX Item "--password КОРИСТУВАЧ:ВАРІАНТ" Встановити пароль для користувача \f(CW\*(C`КОРИСТУВАЧ\*(C'\fR. (Зауважте, що за допомогою цього параметра \fIне можна\fR створювати облікові записи користувачів.) @@ -699,11 +728,7 @@ Wrap error, warning, and informative messages. This is the default when the out .RE .IP "\fB\-\-selinux\-relabel\fR" 4 .IX Item "--selinux-relabel" -Повторно встановити мітки для файлів у гостьовій системі так, щоб вони були правильними з точки зору SELinux. -.Sp -Якщо буде використано цей параметр, програма спробує змінити мітки файлів негайно, але якщо цього зробити не вдасться, вона змінить часову мітку файла \fI/.autorelabel\fR на образі, щоб дію зі зміни міток було заплановано на наступне завантаження образу. -.Sp -Вам слід використовувати цей параметр лише для гостьових систем із підтримкою SELinux. +This is a compatibility option that does nothing. .IP "\fB\-\-sm\-attach\fR ВАРІАНТ" 4 .IX Item "--sm-attach ВАРІАНТ" Долучити систему до буфера передплати за допомогою \f(CW\*(C`subscription\-manager\*(C'\fR. @@ -1073,7 +1098,7 @@ Wrap error, warning, and informative messages. This is the default when the out .IP "\(bu" 4 Виконується налаштовування гостьової системи у порядку, який задається рядком команди. .IP "\(bu" 4 -Виконується зміна міток SELinux виконано (\fI\-\-selinux\-relabel\fR). +SELinux relabelling is done unless disabled with \fI\-\-no\-selinux\-relabel\fR. .SS "ІМПОРТУВАННЯ ОБРАЗУ ДИСКА" .IX Subsection "ІМПОРТУВАННЯ ОБРАЗУ ДИСКА" \fIІмпортування до libvirt\fR @@ -1148,15 +1173,14 @@ Wrap error, warning, and informative messages. This is the default when the out .PP Типовою командою virt-builder буде: .PP -.Vb 8 +.Vb 7 \& virt\-builder fedora\-27 \e \& \-\-hostname client.example.com \e \& \-\-update \e \& \-\-install puppet \e \& \-\-append\-line \*(Aq/etc/puppet/puppet.conf:[agent]\*(Aq \e \& \-\-append\-line \*(Aq/etc/puppet/puppet.conf:server = puppetmaster.example.com/\*(Aq \e -\& \-\-run\-command \*(Aqsystemctl enable puppet\*(Aq \e -\& \-\-selinux\-relabel +\& \-\-run\-command \*(Aqsystemctl enable puppet\*(Aq .Ve .PP Точний перелік настанов залежить від дистрибутива Linux. Докладніше про це тут: https://docs.puppet.com/puppet/latest/install_pre.html @@ -1672,18 +1696,16 @@ Virt-builder використовує внутрішню реалізацію px Гостьові системи, у яких використовується SELinux (зокрема Fedora і Red Hat Enterprise Linux) потребують коректної мітки SELinux для кожного файла. .PP Virt-builder не може знайти про спосіб, у який новим файлам надаються мітки. Тому існує дві можливі стратегії, використання яких забезпечує встановлення належних міток: -.IP "Користування \fI\-\-selinux\-relabel\fR" 4 -.IX Item "Користування --selinux-relabel" +.IP "Automatic relabeling" 4 +.IX Item "Automatic relabeling" Запуск \fBsetfiles\fR\|(8) безпосередньо перед завершенням збирання образу гостьової системи для встановлення належних міток SELinux на образі диска. .Sp Це рекомендований метод. -.IP "\fI\-\-touch\fR \fI/.autorelabel\fR" 4 -.IX Item "--touch /.autorelabel" +.IP "Using \fI\-\-no\-selinux\-relabel\fR \fI\-\-touch\fR \fI/.autorelabel\fR" 4 +.IX Item "Using --no-selinux-relabel --touch /.autorelabel" Наявність у гостьовій системі файла із назвою \fI/.autorelabel\fR або можливе його створення. .Sp У гостьових системах, де використовується SELinux, це спричиняє запуск \fBrestorecon\fR\|(8) під час першого завантаження. Гостьові системи самостійно перезавантажуються під час першого використання — це нормальна і нешкідлива поведінка. -.PP -Будь ласка, зауважте, що якщо у вашій гостьовій системі використовується SELinux, і ви виконуєте над цією системою дії, які можуть призвести до створення файлів або внесення змін до наявних файлів, варто скористатися \fI\-\-selinux\-relabel\fR. Так можна забезпечити встановлення належних міток SELinux для цих файлів. .SH "ПРИДАТНЕ ДО ЧИТАННЯ КОМП'ЮТЕРОМ ВИВЕДЕННЯ" .IX Header "ПРИДАТНЕ ДО ЧИТАННЯ КОМП'ЮТЕРОМ ВИВЕДЕННЯ" Для виведення даних у зручному для машинної обробки форматі можна скористатися параметром \fI\-\-machine\-readable\fR. Додавання цього параметра робить зручним використання virt-builder з інших програм, графічних інтерфейсів тощо. diff --git a/po-docs/uk/virt-builder.pod b/po-docs/uk/virt-builder.pod index 10c9ebc..7311b2f 100644 --- a/po-docs/uk/virt-builder.pod +++ b/po-docs/uk/virt-builder.pod @@ -106,10 +106,6 @@ Virt-builder — інструмент для швидкого збирання virt-builder debian-7 --update -Для гостьових систем, де використовується SELinux, зокрема Fedora і Red Hat Enterprise Linux, може знадобитися зміна міток SELinux після встановлення або оновлення пакунків (див. L нижче): - - virt-builder fedora-27 --update --selinux-relabel - =head2 Налаштовування встановленої системи Передбачено багато параметрів, за допомогою яких ви можете налаштувати встановлення. Це зокрема параметр I<--run>/I<--run-command>, за допомогою якого можна виконати скрипт оболонки або команду під час створення образу диска і додати або змінити файли, які буде включено до образу диска. За допомогою параметра I<--firstboot>/I<--firstboot-command> можна додати скрипти або команди, які буде виконано під час першого завантаження гостьової системи. За допомогою параметра I<--edit> можна редагувати файли, а параметра I<--upload> — вивантажувати файли до образу. @@ -762,7 +758,7 @@ I<--sm-remove> вилучає усі передплати з гостьової =item * -Виконується зміна міток SELinux виконано (I<--selinux-relabel>). +SELinux relabelling is done unless disabled with I<--no-selinux-relabel>. =back @@ -843,8 +839,7 @@ I<--sm-remove> вилучає усі передплати з гостьової --install puppet \ --append-line '/etc/puppet/puppet.conf:[agent]' \ --append-line '/etc/puppet/puppet.conf:server = puppetmaster.example.com/' \ - --run-command 'systemctl enable puppet' \ - --selinux-relabel + --run-command 'systemctl enable puppet' Точний перелік настанов залежить від дистрибутива Linux. Докладніше про це тут: L @@ -1347,13 +1342,13 @@ Virt-builder не може знайти про спосіб, у який нов =over 4 -=item Користування I<--selinux-relabel> +=item Automatic relabeling Запуск L безпосередньо перед завершенням збирання образу гостьової системи для встановлення належних міток SELinux на образі диска. Це рекомендований метод. -=item I<--touch> F +=item Using I<--no-selinux-relabel> I<--touch> F Наявність у гостьовій системі файла із назвою F або можливе його створення. @@ -1361,8 +1356,6 @@ Virt-builder не може знайти про спосіб, у який нов =back -Будь ласка, зауважте, що якщо у вашій гостьовій системі використовується SELinux, і ви виконуєте над цією системою дії, які можуть призвести до створення файлів або внесення змін до наявних файлів, варто скористатися I<--selinux-relabel>. Так можна забезпечити встановлення належних міток SELinux для цих файлів. - =head1 ПРИДАТНЕ ДО ЧИТАННЯ КОМП'ЮТЕРОМ ВИВЕДЕННЯ Для виведення даних у зручному для машинної обробки форматі можна скористатися параметром I<--machine-readable>. Додавання цього параметра робить зручним використання virt-builder з інших програм, графічних інтерфейсів тощо. diff --git a/po-docs/uk/virt-cat.1 b/po-docs/uk/virt-cat.1 index df92343..2faa6f3 100644 --- a/po-docs/uk/virt-cat.1 +++ b/po-docs/uk/virt-cat.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-cat 1" -.TH virt-cat 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-cat 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -218,6 +218,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -337,7 +346,7 @@ multiple keys on stdin, one per line. Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -© Red Hat Inc., 2010–2012 +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-cat.pod b/po-docs/uk/virt-cat.pod index 4895692..a8bb351 100644 --- a/po-docs/uk/virt-cat.pod +++ b/po-docs/uk/virt-cat.pod @@ -231,5 +231,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -© Red Hat Inc., 2010–2012 +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-customize.1 b/po-docs/uk/virt-customize.1 index 8e24185..484460c 100644 --- a/po-docs/uk/virt-customize.1 +++ b/po-docs/uk/virt-customize.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-customize 1" -.TH virt-customize 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-customize 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -209,6 +209,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -407,6 +416,34 @@ Wrap error, warning, and informative messages. This is the default when the out .IP "\fB\-\-hostname\fR НАЗВА_ВУЗЛА" 4 .IX Item "--hostname НАЗВА_ВУЗЛА" Встановити як назву вузла гостьової системи значення \f(CW\*(C`НАЗВА_ВУЗЛА\*(C'\fR. Якщо потрібно, можете скористатися форматом із крапкою, «назва_вузла.назва_домену» (\s-1FQDN\s0). +.IP "\fB\-\-inject\-qemu\-ga\fR \s-1METHOD\s0" 4 +.IX Item "--inject-qemu-ga METHOD" +Inject the \s-1QEMU\s0 Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see \fBqemu\-ga\fR\|(8)). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. +.Sp +The parameter is the same as used by the \fI\-\-inject\-virtio\-win\fR operation. +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.IP "\fB\-\-inject\-virtio\-win\fR \s-1METHOD\s0" 4 +.IX Item "--inject-virtio-win METHOD" +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. +.Sp +The parameter can be one of: +.RS 4 +.IP "\s-1ISO\s0" 4 +.IX Item "ISO" +The path to the \s-1ISO\s0 image containing the virtio-win drivers (eg. \fI/usr/share/virtio\-win/virtio\-win.iso\fR). +.IP "\s-1DIR\s0" 4 +.IX Item "DIR" +The directory containing the unpacked virtio-win drivers (eg. \fI/usr/share/virtio\-win\fR). +.ie n .IP "\fB""osinfo""\fR" 4 +.el .IP "\fB``osinfo''\fR" 4 +.IX Item "osinfo" +The literal string \f(CW"osinfo"\fR means to use the libosinfo database to locate the drivers. (See \fBosinfo\-query\fR\|(1). +.RE +.RS 4 +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.RE .IP "\fB\-\-install\fR ПАКУНОК,ПАКУНОК.." 4 .IX Item "--install ПАКУНОК,ПАКУНОК.." Встановити іменовані пакунки (список значень, відокремлених комами). Ці пакунки буде встановлено під час збирання образу за допомогою програми для керування пакунків гостьової системи (наприклад, apt, yum тощо) і з'єднання із мережею основної системи. @@ -432,6 +469,13 @@ Wrap error, warning, and informative messages. This is the default when the out Витерти \f(CW\*(C`builder.log\*(C'\fR (файл журналу із командами збирання) з образу після завершення збирання. Якщо ви не хочете явним чином показувати, як було зібрано образ, скористайтеся цим параметром. .Sp Див. також \*(L"\s-1LOG FILE\*(R"\s0. +.IP "\fB\-\-no\-selinux\-relabel\fR" 4 +.IX Item "--no-selinux-relabel" +Do not attempt to correct the SELinux labels of files in the guest. +.Sp +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch \fI/.autorelabel\fR on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. +.Sp +The option is a no-op for guests that do not support SELinux. .IP "\fB\-\-password\fR КОРИСТУВАЧ:ВАРІАНТ" 4 .IX Item "--password КОРИСТУВАЧ:ВАРІАНТ" Встановити пароль для користувача \f(CW\*(C`КОРИСТУВАЧ\*(C'\fR. (Зауважте, що за допомогою цього параметра \fIне можна\fR створювати облікові записи користувачів.) @@ -488,11 +532,7 @@ Wrap error, warning, and informative messages. This is the default when the out .RE .IP "\fB\-\-selinux\-relabel\fR" 4 .IX Item "--selinux-relabel" -Повторно встановити мітки для файлів у гостьовій системі так, щоб вони були правильними з точки зору SELinux. -.Sp -Якщо буде використано цей параметр, програма спробує змінити мітки файлів негайно, але якщо цього зробити не вдасться, вона змінить часову мітку файла \fI/.autorelabel\fR на образі, щоб дію зі зміни міток було заплановано на наступне завантаження образу. -.Sp -Вам слід використовувати цей параметр лише для гостьових систем із підтримкою SELinux. +This is a compatibility option that does nothing. .IP "\fB\-\-sm\-attach\fR ВАРІАНТ" 4 .IX Item "--sm-attach ВАРІАНТ" Долучити систему до буфера передплати за допомогою \f(CW\*(C`subscription\-manager\*(C'\fR. @@ -595,7 +635,7 @@ Wrap error, warning, and informative messages. This is the default when the out Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2011\-2020 Red Hat Inc. +Copyright (C) 2011\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" This program is free software; you can redistribute it and/or modify it diff --git a/po-docs/uk/virt-customize.pod b/po-docs/uk/virt-customize.pod index 2e9e6b9..e9d54eb 100644 --- a/po-docs/uk/virt-customize.pod +++ b/po-docs/uk/virt-customize.pod @@ -249,5 +249,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2011-2020 Red Hat Inc. +Copyright (C) 2011-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-df.1 b/po-docs/uk/virt-df.1 index bf9eed2..b6608ce 100644 --- a/po-docs/uk/virt-df.1 +++ b/po-docs/uk/virt-df.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-df 1" -.TH virt-df 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-df 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -309,13 +309,13 @@ default value which is usually 512 bytes. See also Ця програма повертає значення 0 у разі успішного завершення і ненульове значення, якщо сталася помилка. .SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ" .IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -\&\fBdf\fR\|(1), \fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBvirt\-filesystems\fR\|(1), http://libguestfs.org/. +\&\fBdf\fR\|(1), \fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBvirt\-drivers\fR\|(1), \fBvirt\-filesystems\fR\|(1), http://libguestfs.org/. .SH "АВТОР" .IX Header "АВТОР" Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2009\-2020 Red Hat Inc. +Copyright (C) 2009\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-df.pod b/po-docs/uk/virt-df.pod index 851890c..89bd13a 100644 --- a/po-docs/uk/virt-df.pod +++ b/po-docs/uk/virt-df.pod @@ -211,7 +211,7 @@ C (і L) отримує інформацію, виконуючи =head1 ТАКОЖ ПЕРЕГЛЯНЬТЕ -L, L, L, L, L. +L, L, L, L, L, L. =head1 АВТОР @@ -219,5 +219,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-dib.1 b/po-docs/uk/virt-dib.1 index 1265d4c..d4a06c4 100644 --- a/po-docs/uk/virt-dib.1 +++ b/po-docs/uk/virt-dib.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-dib 1" -.TH virt-dib 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-dib 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po-docs/uk/virt-diff.1 b/po-docs/uk/virt-diff.1 index 8956504..d44c64c 100644 --- a/po-docs/uk/virt-diff.1 +++ b/po-docs/uk/virt-diff.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-diff 1" -.TH virt-diff 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-diff 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -237,6 +237,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -317,7 +326,7 @@ multiple keys on stdin, one per line. Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2009\-2020 Red Hat Inc. +Copyright (C) 2009\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-diff.pod b/po-docs/uk/virt-diff.pod index 8fc63f7..56eb861 100644 --- a/po-docs/uk/virt-diff.pod +++ b/po-docs/uk/virt-diff.pod @@ -212,5 +212,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-drivers.pod b/po-docs/uk/virt-drivers.pod new file mode 100644 index 0000000..2db48ae --- /dev/null +++ b/po-docs/uk/virt-drivers.pod @@ -0,0 +1,205 @@ + +=head1 НАЗВА + +virt-drivers - Detect bootloader, kernel and drivers inside guest + +=head1 КОРОТКИЙ ОПИС + + virt-drivers [--options] -d domname + + virt-drivers [--options] -a disk.img + +=head1 ОПИС + +This tool can detect the bootloader, kernel and drivers inside some guests from only the disk image. It can detect, for example, whether a disk image needs BIOS or UEFI to boot, and whether it supports virtio or requires slower emulated devices. + +=head2 Notes + +Normally you should distribute hypervisor metadata (eg. libvirt XML or OVF) alongside disk images to tell the hypervisor how to boot them. This tool is used when this metadata has not been provided. Work with the supplier of the disk image to get them to provide proper metadata. + +=head1 ФОРМАТ XML + +The output is an XML document. At the top level it lists the operating systems found (the same as L): + + + + /dev/sda2 + linux + x86_64 + fedora + ... + + + /dev/sdb1 + ... + + + +=head2 EfirmwareE + +The EfirmwareE element lists the firmware which is required to boot the guest. For UEFI it will additionally show the EFI system partition ("ESP"). Guests may support multiple boot firmwares. For example this guest is detected as using UEFI boot, and the UEFI ESP is the first partition of the first disk: + + + /dev/sda1 + + ... + +=head2 EbootloaderE and EkernelE + +The EbootloaderE element shows the bootloader found in the Linux guest. If known, this may contain information about what Linux kernels are provided. For example: + + + + + /dev/sda2 + linux + ... + + + kernel + 6.1.0-0.rc6.46.fc38.x86_64 + /boot/vmlinuz-6.1.0-0.rc6.46.fc38.x86_64 + + ... + + + + ... + + + +Many more fields are usually available for Linux guests, including a complete list of kernel modules and information about support for virtio. For a complete example see: L + +=head2 EdriversE + +The EdriversE element lists information about drivers found in Windows guests: + + + + + /dev/sda2 + windows + ... + + + scsidev + + + + ... + + +The driver name (eg. C) corresponds to the Windows driver F<.INF> file (eg. F). The list of PCI, USB etc devices are the matching devices which would cause this driver to load at boot. + +=head1 ПАРАМЕТРИ + +=over 4 + +=item B<--help> + +Показати довідкове повідомлення. + +=item B<-a> файл + +=item B<--add> файл + +Додати I<файл>, який має бути образом диска з віртуальної машини. + +Формат образу диска визначається автоматично. Щоб перевизначити його і примусово використати певний формат, скористайтеся параметром I<--format>. + +=item B<-a> адреса + +=item B<--add> адреса + +Додати віддалений диск. Формат адреси є сумісним із guestfish. Див. L. + +=item B<--blocksize> B<512> + +=item B<--blocksize> B<4096> + +This parameter sets the sector size of the disk image added with I<-a> option and is ignored for libvirt guest added with I<-d> option. See also L. + +=item B<--colors> + +=item B<--colours> + +Використовувати послідовності символів ANSI для розфарбовування повідомлень. Ці послідовності типово використовуються, якщо дані виводяться на термінал tty. Якщо дані, виведені програмою, спрямовуються до файла, послідовності визначення кольорів ANSI буде вимкнено, якщо ви не додасте до команди цей параметр. + +=item B<-c> адреса + +=item B<--connect> адреса + +Якщо використовується libvirt, встановити з’єднання з вказаним I. Якщо пропущено, з’єднання буде встановлено з типовим гіпервізором libvirt. + +Якщо вказати блокові пристрої гостьових систем безпосередньо (I<-a>), libvirt не буде використовуватися взагалі. + +=item B<-d> гість + +=item B<--domain> гість + +Додати всі диски з вказаної гостьової системи libvirt. UUID доменів можна використовувати замість назв. + +=item B<--echo-keys> + +Типово, якщо virt-get-kernel попросить вас ввести ключ або пароль, програма не відтворюватиме введені символи на екрані. Якщо ви не боїтеся TEMPEST-нападів, або у вашій кімнаті нікого, окрім вас, немає, ви можете скористатися цим прапорцем, щоб бачити, які саме символи ви вводите. + +=item B<--format> raw|qcow2|.. + +=item B<--format> auto + +Типовим значенням для параметра I<-a> є автоматичне визначення формату образу диска. Використання цього параметра примусово визначає значення параметрів I<-a> формату диска у рядку команди. + +Якщо ви користуєтеся ненадійними образами гостьових систем у необробленому форматі, вам слід скористатися цим параметром для визначення формату диска. Таким чином можна уникнути можливих проблем з захистом для сформованих зловмисниками гостьових систем (CVE-2010-3851). + +__INCLUDE:key-option.pod__ + +__INCLUDE:keys-from-stdin-option.pod__ + +=item B<-q> + +=item B<--quiet> + +Не виводити звичайних повідомлень щодо поступу. + +=item B<-v> + +=item B<--verbose> + +Увімкнути докладний показ повідомлень з метою діагностики. + +=item B<-V> + +=item B<--version> + +Показати дані щодо версії і завершити роботу. + +=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> + +Увімкнути трасування викликів програмного інтерфейсу libguestfs. + +=back + +=head1 ЗМІННІ СЕРЕДОВИЩА + +Опис інших змінних середовища, які стосуються усіх програм libguestfs, наведено у розділі L. + +=head1 СТАН ВИХОДУ + +Ця програма повертає значення 0 у разі успішного завершення і ненульове значення, якщо сталася помилка. + +=head1 ТАКОЖ ПЕРЕГЛЯНЬТЕ + +L, L, L, L, L, L, L. + +=head1 АВТОР + +Richard W.M. Jones L + +=head1 АВТОРСЬКІ ПРАВА + +Copyright (C) 2009-2023 Red Hat Inc. + diff --git a/po-docs/uk/virt-edit.1 b/po-docs/uk/virt-edit.1 index 32259e0..6f5e9dc 100644 --- a/po-docs/uk/virt-edit.1 +++ b/po-docs/uk/virt-edit.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-edit 1" -.TH virt-edit 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-edit 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -246,6 +246,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -423,7 +432,7 @@ multiple keys on stdin, one per line. Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2009\-2020 Red Hat Inc. +Copyright (C) 2009\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-edit.pod b/po-docs/uk/virt-edit.pod index ec2e32e..9720f0f 100644 --- a/po-docs/uk/virt-edit.pod +++ b/po-docs/uk/virt-edit.pod @@ -307,5 +307,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-filesystems.1 b/po-docs/uk/virt-filesystems.1 index a1f83d7..7e1e7da 100644 --- a/po-docs/uk/virt-filesystems.1 +++ b/po-docs/uk/virt-filesystems.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-filesystems 1" -.TH virt-filesystems 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-filesystems 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -413,13 +413,13 @@ multiple keys on stdin, one per line. Ця програма повертає значення 0 у разі успішного завершення і ненульове значення, якщо сталася помилка. .SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ" .IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBvirt\-cat\fR\|(1), \fBvirt\-df\fR\|(1), \fBvirt\-list\-filesystems\fR\|(1), \fBvirt\-list\-partitions\fR\|(1), \fBcsvtool\fR\|(1), http://libguestfs.org/. +\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBvirt\-cat\fR\|(1), \fBvirt\-df\fR\|(1), \fBvirt\-drivers\fR\|(1), \fBvirt\-list\-filesystems\fR\|(1), \fBvirt\-list\-partitions\fR\|(1), \fBcsvtool\fR\|(1), http://libguestfs.org/. .SH "АВТОР" .IX Header "АВТОР" Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -© Red Hat Inc., 2010–2012 +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-filesystems.pod b/po-docs/uk/virt-filesystems.pod index 322f211..912c094 100644 --- a/po-docs/uk/virt-filesystems.pod +++ b/po-docs/uk/virt-filesystems.pod @@ -313,7 +313,7 @@ UUID буде показано, лише якщо вказано парамет =head1 ТАКОЖ ПЕРЕГЛЯНЬТЕ -L, L, L, L, L, L, L, L. +L, L, L, L, L, L, L, L, L. =head1 АВТОР @@ -321,5 +321,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -© Red Hat Inc., 2010–2012 +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-format.1 b/po-docs/uk/virt-format.1 index a07b4bd..59c8553 100644 --- a/po-docs/uk/virt-format.1 +++ b/po-docs/uk/virt-format.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-format 1" -.TH virt-format 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-format 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po-docs/uk/virt-get-kernel.1 b/po-docs/uk/virt-get-kernel.1 index b419c9d..ed655f0 100644 --- a/po-docs/uk/virt-get-kernel.1 +++ b/po-docs/uk/virt-get-kernel.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-get-kernel 1" -.TH virt-get-kernel 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-get-kernel 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -88,7 +88,7 @@ virt-get-kernel — видобування ядра і диска в пам'ят .Ve .SH "ОПИС" .IX Header "ОПИС" -За допомогою цього параметра можна видобути ядро та initramfs з гостьової системи. +This program extracts the kernel and initramfs from a guest. .PP Формат образу диска буде визначено автоматично, якщо ви не вкажете його за допомогою параметра \fI\-\-format\fR. .PP @@ -170,6 +170,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -259,13 +268,13 @@ Wrap error, warning, and informative messages. This is the default when the out Ця програма повертає значення 0 у разі успішного завершення і ненульове значення, якщо сталася помилка. .SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ" .IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBguestmount\fR\|(1), \fBvirt\-copy\-out\fR\|(1), http://libguestfs.org/. +\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), \fBguestmount\fR\|(1), \fBvirt\-copy\-out\fR\|(1), \fBvirt\-drivers\fR\|(1), http://libguestfs.org/. .SH "АВТОР" .IX Header "АВТОР" Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2013\-2020 Red Hat Inc. +Copyright (C) 2013\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-get-kernel.pod b/po-docs/uk/virt-get-kernel.pod index 4239fb6..05e72ca 100644 --- a/po-docs/uk/virt-get-kernel.pod +++ b/po-docs/uk/virt-get-kernel.pod @@ -11,7 +11,7 @@ virt-get-kernel — видобування ядра і диска в пам'ят =head1 ОПИС -За допомогою цього параметра можна видобути ядро та initramfs з гостьової системи. +This program extracts the kernel and initramfs from a guest. Формат образу диска буде визначено автоматично, якщо ви не вкажете його за допомогою параметра I<--format>. @@ -162,7 +162,7 @@ Wrap error, warning, and informative messages. This is the default when the out =head1 ТАКОЖ ПЕРЕГЛЯНЬТЕ -L, L, L, L, L. +L, L, L, L, L, L. =head1 АВТОР @@ -170,5 +170,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2013-2020 Red Hat Inc. +Copyright (C) 2013-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-index-validate.1 b/po-docs/uk/virt-index-validate.1 index 95c687b..9cfd34c 100644 --- a/po-docs/uk/virt-index-validate.1 +++ b/po-docs/uk/virt-index-validate.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-index-validate 1" -.TH virt-index-validate 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-index-validate 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po-docs/uk/virt-inspector.1 b/po-docs/uk/virt-inspector.1 index 005e615..8c73656 100644 --- a/po-docs/uk/virt-inspector.1 +++ b/po-docs/uk/virt-inspector.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-inspector 1" -.TH virt-inspector 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-inspector 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -111,6 +111,8 @@ Virt-inspector може одночасно інспектувати і ство Оскільки virt-inspector потрібен безпосередній доступ до образів гостьової системи, програма, зазвичай, не працюватиме, якщо використовується віддалене з'єднання із libvirt. .PP Усі дані, які доступні за допомогою virt-inspector, також доступні і з основного програмного інтерфейсу інспектування libguestfs (див. \*(L"ІНСПЕКТУВАННЯ\*(R" in \fBguestfs\fR\|(3)). Ті самі дані можна також отримати за допомогою guestfish або прив'язок до libguestfs багатьма мовами програмування (див. \*(L"ОТРИМАННЯ ДАНИХ ІНСПЕКТУВАННЯ ЗА ДОПОМОГОЮ ПРОГРАМНОГО ІНТЕРФЕЙСУ \s-1LIBGUESTFS\*(R"\s0). +.PP +Additional information about bootloader, kernel and drivers inside a guest can be found using \fBvirt\-drivers\fR\|(1). .SH "ПАРАМЕТРИ" .IX Header "ПАРАМЕТРИ" .IP "\fB\-\-help\fR" 4 @@ -189,6 +191,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -493,7 +504,7 @@ multiple keys on stdin, one per line. Ця програма повертає значення 0 у разі успішного завершення і ненульове значення, якщо сталася помилка. .SH "ТАКОЖ ПЕРЕГЛЯНЬТЕ" .IX Header "ТАКОЖ ПЕРЕГЛЯНЬТЕ" -\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), http://www.w3.org/TR/xpath/, \fBbase64\fR\|(1), \fBxmlstarlet\fR\|(1), http://libguestfs.org/. +\&\fBguestfs\fR\|(3), \fBguestfish\fR\|(1), http://www.w3.org/TR/xpath/, \fBbase64\fR\|(1), \fBxmlstarlet\fR\|(1), \fBvirt\-drivers\fR\|(1), http://libguestfs.org/. .SH "АВТОРИ" .IX Header "АВТОРИ" .IP "\(bu" 4 @@ -502,7 +513,7 @@ Richard W.M. Jones http://people.redhat.com/~rjones/ Matthew Booth mbooth@redhat.com .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -© Red Hat Inc., 2010–2012 +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-inspector.pod b/po-docs/uk/virt-inspector.pod index de60242..67f38e4 100644 --- a/po-docs/uk/virt-inspector.pod +++ b/po-docs/uk/virt-inspector.pod @@ -33,6 +33,8 @@ Virt-inspector може одночасно інспектувати і ство Усі дані, які доступні за допомогою virt-inspector, також доступні і з основного програмного інтерфейсу інспектування libguestfs (див. L). Ті самі дані можна також отримати за допомогою guestfish або прив'язок до libguestfs багатьма мовами програмування (див. L). +Additional information about bootloader, kernel and drivers inside a guest can be found using L. + =head1 ПАРАМЕТРИ =over 4 @@ -368,7 +370,7 @@ C виконує інспектування поточного об =head1 ТАКОЖ ПЕРЕГЛЯНЬТЕ -L, L, L, L, L, L. +L, L, L, L, L, L, L. =head1 АВТОРИ @@ -386,5 +388,5 @@ Matthew Booth L =head1 АВТОРСЬКІ ПРАВА -© Red Hat Inc., 2010–2012 +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-log.1 b/po-docs/uk/virt-log.1 index ecdd435..163f408 100644 --- a/po-docs/uk/virt-log.1 +++ b/po-docs/uk/virt-log.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-log 1" -.TH virt-log 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-log 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -196,6 +196,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -234,7 +243,7 @@ multiple keys on stdin, one per line. Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2010\-2020 Red Hat Inc. +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-log.pod b/po-docs/uk/virt-log.pod index 4be0f1d..90f7a78 100644 --- a/po-docs/uk/virt-log.pod +++ b/po-docs/uk/virt-log.pod @@ -123,5 +123,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2010-2020 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-ls.1 b/po-docs/uk/virt-ls.1 index ac7f419..4d59ea8 100644 --- a/po-docs/uk/virt-ls.1 +++ b/po-docs/uk/virt-ls.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-ls 1" -.TH virt-ls 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-ls 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -389,6 +389,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -533,7 +542,7 @@ multiple keys on stdin, one per line. Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2009\-2020 Red Hat Inc. +Copyright (C) 2009\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-ls.pod b/po-docs/uk/virt-ls.pod index c45e958..2ad2804 100644 --- a/po-docs/uk/virt-ls.pod +++ b/po-docs/uk/virt-ls.pod @@ -429,5 +429,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2009-2020 Red Hat Inc. +Copyright (C) 2009-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-make-fs.1 b/po-docs/uk/virt-make-fs.1 index a34d93b..c6adbeb 100644 --- a/po-docs/uk/virt-make-fs.1 +++ b/po-docs/uk/virt-make-fs.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-make-fs 1" -.TH virt-make-fs 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-make-fs 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -255,7 +255,7 @@ See also \*(L"guestfs_add_drive_opts\*(R" in \fBguestfs\fR\|(3). Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2010\-2020 Red Hat Inc. +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-make-fs.pod b/po-docs/uk/virt-make-fs.pod index 181e552..6740bb7 100644 --- a/po-docs/uk/virt-make-fs.pod +++ b/po-docs/uk/virt-make-fs.pod @@ -179,5 +179,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2010-2020 Red Hat Inc. +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-resize.1 b/po-docs/uk/virt-resize.1 index 3128b65..4796c10 100644 --- a/po-docs/uk/virt-resize.1 +++ b/po-docs/uk/virt-resize.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-resize 1" -.TH virt-resize 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-resize 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -654,7 +654,7 @@ In both cases, virt-resize will not expand the mentioned filesystem; the result Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -© Red Hat Inc., 2010–2012 +Copyright (C) 2010\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-resize.pod b/po-docs/uk/virt-resize.pod index f573b3a..73053fe 100644 --- a/po-docs/uk/virt-resize.pod +++ b/po-docs/uk/virt-resize.pod @@ -617,5 +617,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -© Red Hat Inc., 2010–2012 +Copyright (C) 2010-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-sparsify.1 b/po-docs/uk/virt-sparsify.1 index 05323a3..180bb6c 100644 --- a/po-docs/uk/virt-sparsify.1 +++ b/po-docs/uk/virt-sparsify.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-sparsify 1" -.TH virt-sparsify 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-sparsify 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -261,6 +261,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -438,7 +447,7 @@ Wrap error, warning, and informative messages. This is the default when the out Richard W.M. Jones http://people.redhat.com/~rjones/ .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2011\-2020 Red Hat Inc. +Copyright (C) 2011\-2023 Red Hat Inc. .SH "LICENSE" .IX Header "LICENSE" .SH "BUGS" diff --git a/po-docs/uk/virt-sparsify.pod b/po-docs/uk/virt-sparsify.pod index 181b94e..a43e079 100644 --- a/po-docs/uk/virt-sparsify.pod +++ b/po-docs/uk/virt-sparsify.pod @@ -376,5 +376,5 @@ Richard W.M. Jones L =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2011-2020 Red Hat Inc. +Copyright (C) 2011-2023 Red Hat Inc. diff --git a/po-docs/uk/virt-sysprep.1 b/po-docs/uk/virt-sysprep.1 index ec5983c..ece8fc7 100644 --- a/po-docs/uk/virt-sysprep.1 +++ b/po-docs/uk/virt-sysprep.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-sysprep 1" -.TH virt-sysprep 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-sysprep 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -234,6 +234,15 @@ Use the specified \f(CW\*(C`KEY_STRING\*(C'\fR as passphrase. .el .IP "\fB\-\-key\fR \f(CWID\fR:file:FILENAME" 4 .IX Item "--key ID:file:FILENAME" Read the passphrase from \fI\s-1FILENAME\s0\fR. +.ie n .IP "\fB\-\-key\fR ""ID"":clevis" 4 +.el .IP "\fB\-\-key\fR \f(CWID\fR:clevis" 4 +.IX Item "--key ID:clevis" +Attempt passphrase-less unlocking for \f(CW\*(C`ID\*(C'\fR with Clevis, over the +network. Please refer to \*(L"\s-1ENCRYPTED DISKS\*(R"\s0 in \fBguestfs\fR\|(3) for more +information on network-bound disk encryption (\s-1NBDE\s0). +.Sp +Note that if any such option is present on the command line, \s-1QEMU\s0 user +networking will be automatically enabled for the libguestfs appliance. .RE .RS 4 .RE @@ -444,6 +453,36 @@ Wrap error, warning, and informative messages. This is the default when the out .el .IP "\fB\-\-hostname\fR НАЗВА_ВУЗЛА (див. \f(CWcustomize\fR нижче)" 4 .IX Item "--hostname НАЗВА_ВУЗЛА (див. customize нижче)" Встановити як назву вузла гостьової системи значення \f(CW\*(C`НАЗВА_ВУЗЛА\*(C'\fR. Якщо потрібно, можете скористатися форматом із крапкою, «назва_вузла.назва_домену» (\s-1FQDN\s0). +.ie n .IP "\fB\-\-inject\-qemu\-ga\fR \s-1METHOD\s0 (see ""customize"" below)" 4 +.el .IP "\fB\-\-inject\-qemu\-ga\fR \s-1METHOD\s0 (see \f(CWcustomize\fR below)" 4 +.IX Item "--inject-qemu-ga METHOD (see customize below)" +Inject the \s-1QEMU\s0 Guest Agent into a Windows guest. The guest agent communicates with qemu through a socket in order to provide enhanced features (see \fBqemu\-ga\fR\|(8)). This operation also injects a firstboot script so that the Guest Agent is installed when the guest boots. +.Sp +The parameter is the same as used by the \fI\-\-inject\-virtio\-win\fR operation. +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.ie n .IP "\fB\-\-inject\-virtio\-win\fR \s-1METHOD\s0 (see ""customize"" below)" 4 +.el .IP "\fB\-\-inject\-virtio\-win\fR \s-1METHOD\s0 (see \f(CWcustomize\fR below)" 4 +.IX Item "--inject-virtio-win METHOD (see customize below)" +Inject virtio-win drivers into a Windows guest. These drivers add virtio accelerated drivers suitable when running on top of a hypervisor that supports virtio (such as qemu/KVM). The operation also adjusts the Windows Registry so that the drivers are installed when the guest boots. +.Sp +The parameter can be one of: +.RS 4 +.IP "\s-1ISO\s0" 4 +.IX Item "ISO" +The path to the \s-1ISO\s0 image containing the virtio-win drivers (eg. \fI/usr/share/virtio\-win/virtio\-win.iso\fR). +.IP "\s-1DIR\s0" 4 +.IX Item "DIR" +The directory containing the unpacked virtio-win drivers (eg. \fI/usr/share/virtio\-win\fR). +.ie n .IP "\fB""osinfo""\fR" 4 +.el .IP "\fB``osinfo''\fR" 4 +.IX Item "osinfo" +The literal string \f(CW"osinfo"\fR means to use the libosinfo database to locate the drivers. (See \fBosinfo\-query\fR\|(1). +.RE +.RS 4 +.Sp +Note that to do a full conversion of a Windows guest from a foreign hypervisor like VMware (which involves many other operations) you should use the \fBvirt\-v2v\fR\|(1) tool instead of this. +.RE .ie n .IP "\fB\-\-install\fR ПАКУНОК,ПАКУНОК... (див. ""customize"" нижче)" 4 .el .IP "\fB\-\-install\fR ПАКУНОК,ПАКУНОК... (див. \f(CWcustomize\fR нижче)" 4 .IX Item "--install ПАКУНОК,ПАКУНОК... (див. customize нижче)" @@ -486,6 +525,14 @@ Wrap error, warning, and informative messages. This is the default when the out Витерти \f(CW\*(C`builder.log\*(C'\fR (файл журналу із командами збирання) з образу після завершення збирання. Якщо ви не хочете явним чином показувати, як було зібрано образ, скористайтеся цим параметром. .Sp Див. також \*(L"\s-1LOG FILE\*(R"\s0. +.ie n .IP "\fB\-\-no\-selinux\-relabel\fR (see ""customize"" below)" 4 +.el .IP "\fB\-\-no\-selinux\-relabel\fR (see \f(CWcustomize\fR below)" 4 +.IX Item "--no-selinux-relabel (see customize below)" +Do not attempt to correct the SELinux labels of files in the guest. +.Sp +In such guests that support SELinux, customization automatically relabels files so that they have the correct SELinux label. (The relabeling is performed immediately, but if the operation fails, customization will instead touch \fI/.autorelabel\fR on the image to schedule a relabel operation for the next time the image boots.) This option disables the automatic relabeling. +.Sp +The option is a no-op for guests that do not support SELinux. .ie n .IP "\fB\-\-password\fR КОРИСТУВАЧ:ВАРІАНТ (див. ""customize"" нижче)" 4 .el .IP "\fB\-\-password\fR КОРИСТУВАЧ:ВАРІАНТ (див. \f(CWcustomize\fR нижче)" 4 .IX Item "--password КОРИСТУВАЧ:ВАРІАНТ (див. customize нижче)" @@ -575,11 +622,7 @@ Wrap error, warning, and informative messages. This is the default when the out .ie n .IP "\fB\-\-selinux\-relabel\fR (див. ""customize"" нижче)" 4 .el .IP "\fB\-\-selinux\-relabel\fR (див. \f(CWcustomize\fR нижче)" 4 .IX Item "--selinux-relabel (див. customize нижче)" -Повторно встановити мітки для файлів у гостьовій системі так, щоб вони були правильними з точки зору SELinux. -.Sp -Якщо буде використано цей параметр, програма спробує змінити мітки файлів негайно, але якщо цього зробити не вдасться, вона змінить часову мітку файла \fI/.autorelabel\fR на образі, щоб дію зі зміни міток було заплановано на наступне завантаження образу. -.Sp -Вам слід використовувати цей параметр лише для гостьових систем із підтримкою SELinux. +This is a compatibility option that does nothing. .ie n .IP "\fB\-\-sm\-attach\fR ВАРІАНТ (див. ""customize"" нижче)" 4 .el .IP "\fB\-\-sm\-attach\fR ВАРІАНТ (див. \f(CWcustomize\fR нижче)" 4 .IX Item "--sm-attach ВАРІАНТ (див. customize нижче)" @@ -919,6 +962,11 @@ Remove the Kerberos host keytab file in the guest. /var/log/xferlog* .IP "·" 4 /var/named/data/named.run +.SS "\fBlvm-system-devices\fP *" +.IX Subsection "lvm-system-devices *" +Remove \s-1LVM2\s0 system.devices file. +.PP +On Linux guests, \s-1LVM2\s0's scanning for physical volumes (PVs) may be restricted to those block devices whose WWIDs are listed in \f(CW\*(C`/etc/lvm/devices/system.devices\*(C'\fR. When cloning VMs, WWIDs may change, breaking \f(CW\*(C`lvm pvscan\*(C'\fR. Remove \f(CW\*(C`/etc/lvm/devices/system.devices\*(C'\fR. .SS "\fBlvm-uuids\fP *" .IX Subsection "lvm-uuids *" Змінити \s-1UUID\s0 ФТ і ГТ \s-1LVM2.\s0 @@ -1212,6 +1260,8 @@ MAC\-адреса мережевої картки Кожен з параметрів або обидва параметри можна використовувати у рядку команди довільну кількість разів. .SH "БЕЗПЕКА" .IX Header "БЕЗПЕКА" +Virtual machines that employ full disk encryption \fIinternally to the guest\fR should not be considered for cloning and distribution, as it provides multiple parties with the same internal volume key, enabling any one such party to decrypt all the other clones. Refer to the \s-1LUKS FAQ\s0 for details. +.PP Хоча virt-sysprep вилучає певні конфіденційні дані з гостьової системи, програма не претендує на вилучення усіх цих даних. Вам слід ознайомитися із розділом \*(L"ДІЇ\*(R" вище і вивчити саму гостьову систему після виконання дій. .PP Файли з конфіденційними даними просто вилучаються. Дані, які у них містяться, можуть залишатися на диску. Такі дані доволі просто відновити за допомогою шістнадцяткового редактора або засобів для відновлення файлів. Ви можете скористатися параметром \fI\-\-scrub\fR для витирання вмісту файлів замість простого їх вилучення. Ще одним способом вилучити конфіденційні дані є використання \fBvirt\-sparsify\fR\|(1). Крім того, витерти вміст вилучених каталогів та inode можна за допомогою команди \fBscrub\fR\|(1). @@ -1274,7 +1324,7 @@ Richard W.M. Jones http://people.redhat.com/~rjones/ Wanlong Gao, Fujitsu Ltd. .SH "АВТОРСЬКІ ПРАВА" .IX Header "АВТОРСЬКІ ПРАВА" -Copyright (C) 2011\-2020 Red Hat Inc. +Copyright (C) 2011\-2023 Red Hat Inc. .PP Авторські права належать Fujitsu Ltd., 2012 .SH "LICENSE" diff --git a/po-docs/uk/virt-sysprep.pod b/po-docs/uk/virt-sysprep.pod index 954e304..17f7ae6 100644 --- a/po-docs/uk/virt-sysprep.pod +++ b/po-docs/uk/virt-sysprep.pod @@ -403,6 +403,8 @@ I<--script скрипт> запускає скрипт командної обо =head1 БЕЗПЕКА +Virtual machines that employ full disk encryption I should not be considered for cloning and distribution, as it provides multiple parties with the same internal volume key, enabling any one such party to decrypt all the other clones. Refer to the L for details. + Хоча virt-sysprep вилучає певні конфіденційні дані з гостьової системи, програма не претендує на вилучення усіх цих даних. Вам слід ознайомитися із розділом L вище і вивчити саму гостьову систему після виконання дій. Файли з конфіденційними даними просто вилучаються. Дані, які у них містяться, можуть залишатися на диску. Такі дані доволі просто відновити за допомогою шістнадцяткового редактора або засобів для відновлення файлів. Ви можете скористатися параметром I<--scrub> для витирання вмісту файлів замість простого їх вилучення. Ще одним способом вилучити конфіденційні дані є використання L. Крім того, витерти вміст вилучених каталогів та inode можна за допомогою команди L. @@ -476,7 +478,7 @@ Wanlong Gao, Fujitsu Ltd. =head1 АВТОРСЬКІ ПРАВА -Copyright (C) 2011-2020 Red Hat Inc. +Copyright (C) 2011-2023 Red Hat Inc. Авторські права належать Fujitsu Ltd., 2012 diff --git a/po-docs/uk/virt-win-reg.1 b/po-docs/uk/virt-win-reg.1 index 143fc32..f654138 100644 --- a/po-docs/uk/virt-win-reg.1 +++ b/po-docs/uk/virt-win-reg.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Podwrapper::Man 1.48.3 (Pod::Simple 3.43) +.\" Automatically generated by Podwrapper::Man 1.50.0 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== @@ -71,7 +71,7 @@ .\" ======================================================================== .\" .IX Title "virt-win-reg 1" -.TH virt-win-reg 1 "2023-01-11" "guestfs-tools-1.48.3" "Virtualization Support" +.TH virt-win-reg 1 "2023-02-07" "guestfs-tools-1.50.0" "Virtualization Support" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/po/Makefile.am b/po/Makefile.am index b4fb04b..e89261c 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -1,5 +1,5 @@ # libguestfs -# Copyright (C) 2009-2021 Red Hat Inc. +# Copyright (C) 2009-2023 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 diff --git a/po/Makefile.in b/po/Makefile.in index fd2b29b..17fa3ec 100644 --- a/po/Makefile.in +++ b/po/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ # libguestfs -# Copyright (C) 2009-2021 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -32,7 +32,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # libguestfs -# Copyright (C) 2009-2020 Red Hat Inc. +# Copyright (C) 2009-2023 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 @@ -218,7 +218,6 @@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -FILECMD = @FILECMD@ GCC_VISIBILITY_HIDDEN = @GCC_VISIBILITY_HIDDEN@ GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ GMSGFMT = @GMSGFMT@ @@ -247,6 +246,8 @@ LIBINTL = @LIBINTL@ LIBLZMA_CFLAGS = @LIBLZMA_CFLAGS@ LIBLZMA_LIBS = @LIBLZMA_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOSINFO_CFLAGS = @LIBOSINFO_CFLAGS@ +LIBOSINFO_LIBS = @LIBOSINFO_LIBS@ LIBS = @LIBS@ LIBTINFO_CFLAGS = @LIBTINFO_CFLAGS@ LIBTINFO_LIBS = @LIBTINFO_LIBS@ @@ -317,6 +318,7 @@ PO4A_TRANSLATE = @PO4A_TRANSLATE@ PODWRAPPER = @PODWRAPPER@ POSUB = @POSUB@ RANLIB = @RANLIB@ +REALPATH = @REALPATH@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/po/POTFILES b/po/POTFILES index 2942d47..5bd24bb 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -16,6 +16,7 @@ common/mlpcre/pcre-c.c common/mlprogress/progress-c.c common/mltools/JSON_parser-c.c common/mltools/getopt-c.c +common/mltools/libosinfo-c.c common/mltools/tools_utils-c.c common/mltools/uri-c.c common/mlutils/c_utils-c.c @@ -37,6 +38,7 @@ common/progress/progress.c common/structs/structs-cleanups.c common/structs/structs-print.c common/utils/cleanups.c +common/utils/environ.c common/utils/gnulib-cleanups.c common/utils/libxml2-cleanups.c common/utils/pcre2-cleanups.c diff --git a/po/POTFILES-ml b/po/POTFILES-ml index 66c7c53..7398479 100644 --- a/po/POTFILES-ml +++ b/po/POTFILES-ml @@ -20,6 +20,13 @@ builder/utils.ml common/mlcustomize/SELinux_relabel.ml common/mlcustomize/customize_cmdline.ml common/mlcustomize/firstboot.ml +common/mlcustomize/guest_packages.ml +common/mlcustomize/inject_virtio_win.ml +common/mldrivers/firmware.ml +common/mldrivers/linux.ml +common/mldrivers/linux_bootloaders.ml +common/mldrivers/linux_kernels.ml +common/mldrivers/windows_drivers.ml common/mlgettext/common_gettext.ml common/mlpcre/PCRE.ml common/mlprogress/progress.ml @@ -27,12 +34,15 @@ common/mlstdutils/guestfs_config.ml common/mlstdutils/std_utils.ml common/mlstdutils/stringMap.ml common/mlstdutils/stringSet.ml +common/mltools/DOM.ml common/mltools/JSON.ml common/mltools/JSON_parser.ml common/mltools/URI.ml common/mltools/checksums.ml common/mltools/curl.ml common/mltools/getopt.ml +common/mltools/libosinfo.ml +common/mltools/libosinfo_utils.ml common/mltools/on_exit.ml common/mltools/planner.ml common/mltools/regedit.ml @@ -68,6 +78,7 @@ dib/output_format_tar.ml dib/output_format_tgz.ml dib/output_format_vhd.ml dib/utils.ml +drivers/drivers.ml get-kernel/get_kernel.ml resize/resize.ml sparsify/cmdline.ml @@ -95,6 +106,7 @@ sysprep/sysprep_operation_ipa_client.ml sysprep/sysprep_operation_kerberos_data.ml sysprep/sysprep_operation_kerberos_hostkeytab.ml sysprep/sysprep_operation_logfiles.ml +sysprep/sysprep_operation_lvm_system_devices.ml sysprep/sysprep_operation_lvm_uuids.ml sysprep/sysprep_operation_machine_id.ml sysprep/sysprep_operation_mail_spool.ml diff --git a/po/guestfs-tools.pot b/po/guestfs-tools.pot index 1536714..5f13f5d 100644 --- a/po/guestfs-tools.pot +++ b/po/guestfs-tools.pot @@ -6,10 +6,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: guestfs-tools 1.48.3\n" +"Project-Id-Version: guestfs-tools 1.50.0\n" "Report-Msgid-Bugs-To: https://bugzilla.redhat.com/enter_bug.cgi?" "component=libguestfs&product=Virtualization+Tools\n" -"POT-Creation-Date: 2023-01-11 10:15+0000\n" +"POT-Creation-Date: 2023-02-07 11:12+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -22,27 +22,27 @@ msgstr "" msgid " %s: already provided by %s" msgstr "" -#: resize/resize.ml:980 +#: resize/resize.ml:1029 msgid " An extra partition will be created for the surplus." msgstr "" -#: resize/resize.ml:954 resize/resize.ml:923 +#: resize/resize.ml:1001 resize/resize.ml:967 msgid " The %s on %s will be expanded using the ‘%s’ method." msgstr "" -#: resize/resize.ml:982 +#: resize/resize.ml:1031 msgid "" " The surplus space is not large enough for an extra partition to be created " "and so it will just be ignored." msgstr "" -#: resize/resize.ml:984 +#: resize/resize.ml:1034 msgid "" " The surplus space will be ignored. Run a partitioning program in the " "guest to partition this extra space if you want." msgstr "" -#: common/mltools/tools_utils.ml:234 +#: common/mltools/tools_utils.ml:235 msgid "%s" msgstr "" @@ -52,11 +52,11 @@ msgid "" "Options:\n" msgstr "" -#: customize/customize_run.ml:446 common/mltools/tools_utils.ml:681 +#: customize/customize_run.ml:412 common/mltools/tools_utils.ml:686 msgid "%s (ignored)" msgstr "" -#: builder/builder.ml:319 +#: builder/builder.ml:330 msgid "" "%s checksum of template did not match the expected checksum!\n" " found checksum: %s\n" @@ -71,10 +71,14 @@ msgstr "" msgid "%s did not return any output" msgstr "" -#: customize/customize_run.ml:244 +#: customize/customize_run.ml:181 msgid "%s does not exist in the guest" msgstr "" +#: customize/customize_run.ml:121 +msgid "%s ignored for non-Windows guest" +msgstr "" + #: builder/simplestreams_parser.ml:59 msgid "%s is not a Simple Streams (index) v1.0 JSON file (format: %s)" msgstr "" @@ -83,7 +87,7 @@ msgstr "" msgid "%s is not a Simple Streams (products) v1.0 JSON file (format: %s)" msgstr "" -#: customize/customize_run.ml:247 +#: customize/customize_run.ml:184 msgid "%s is not a regular file in the guest" msgstr "" @@ -91,11 +95,11 @@ msgstr "" msgid "%s needed but not found" msgstr "" -#: common/mltools/tools_utils.ml:230 common/mltools/tools_utils.ml:201 +#: common/mltools/tools_utils.ml:231 common/mltools/tools_utils.ml:202 msgid "%s: %s" msgstr "" -#: common/mltools/tools_utils.ml:232 +#: common/mltools/tools_utils.ml:233 msgid "%s: %s: %s" msgstr "" @@ -105,7 +109,7 @@ msgid "" "%!" msgstr "" -#: resize/resize.ml:706 +#: resize/resize.ml:733 msgid "" "%s: This extended partition contains logical partitions which might be " "damaged by shrinking it. If you want to shrink this partition, you need to " @@ -114,11 +118,11 @@ msgid "" "line.)" msgstr "" -#: resize/resize.ml:951 +#: resize/resize.ml:997 msgid "%s: This logical volume will be expanded to maximum size." msgstr "" -#: resize/resize.ml:702 +#: resize/resize.ml:724 msgid "" "%s: This partition contains a %s filesystem which will be damaged by " "shrinking it below %Ld bytes (user asked to shrink it to %Ld bytes). If you " @@ -127,7 +131,7 @@ msgid "" "‘%s’ option on the command line.)" msgstr "" -#: resize/resize.ml:698 +#: resize/resize.ml:714 msgid "" "%s: This partition contains an LVM physical volume which will be damaged by " "shrinking it below %Ld bytes (user asked to shrink it to %Ld bytes). If you " @@ -136,7 +140,7 @@ msgid "" "‘%s‘ option on the command line.)" msgstr "" -#: resize/resize.ml:695 +#: resize/resize.ml:707 msgid "" "%s: This partition has unknown content which might be damaged by shrinking " "it. If you want to shrink this partition, you need to use the ‘--resize-" @@ -144,21 +148,21 @@ msgid "" "error came from ‘%s’ option on the command line.)" msgstr "" -#: resize/resize.ml:916 +#: resize/resize.ml:959 msgid "" "%s: This partition will be created, but the contents will be ignored (ie. " "not copied to the target)." msgstr "" -#: resize/resize.ml:918 +#: resize/resize.ml:962 msgid "%s: This partition will be deleted." msgstr "" -#: resize/resize.ml:914 +#: resize/resize.ml:957 msgid "%s: This partition will be left alone." msgstr "" -#: resize/resize.ml:920 +#: resize/resize.ml:964 msgid "%s: This partition will be resized from %s to %s." msgstr "" @@ -178,31 +182,35 @@ msgid "" "read the man page virt-builder(1).\n" msgstr "" -#: builder/index_parser.ml:145 +#: builder/index_parser.ml:156 msgid "%s: cannot determine the virtual size of %s due to compression" msgstr "" -#: builder/index_parser.ml:171 +#: common/mlcustomize/inject_virtio_win.ml:389 +msgid "%s: cannot open virtio-win ISO file: %s" +msgstr "" + +#: builder/index_parser.ml:184 msgid "%s: cannot parse ‘compressed_size’ field for ‘%s’\n" msgstr "" -#: builder/index_parser.ml:196 +#: builder/index_parser.ml:211 msgid "%s: cannot parse ‘hidden’ field for ‘%s’\n" msgstr "" -#: builder/index_parser.ml:132 +#: builder/index_parser.ml:142 msgid "%s: cannot parse ‘revision’ field for ‘%s’\n" msgstr "" -#: builder/index_parser.ml:162 +#: builder/index_parser.ml:174 msgid "%s: cannot parse ‘size’ field for ‘%s’\n" msgstr "" -#: builder/index_parser.ml:246 +#: builder/index_parser.ml:261 msgid "%s: cannot use a URI (‘%s’) in the index file\n" msgstr "" -#: customize/customize_run.ml:67 +#: customize/customize_run.ml:72 msgid "%s: command exited with an error" msgstr "" @@ -216,7 +224,7 @@ msgid "" "read the man page virt-builder-repository(1).\n" msgstr "" -#: customize/customize_main.ml:94 +#: customize/customize_main.ml:98 msgid "" "%s: customize a virtual machine\n" "\n" @@ -228,11 +236,19 @@ msgid "" "read the man page virt-customize(1).\n" msgstr "" -#: common/mltools/tools_utils.ml:171 +#: drivers/drivers.ml:57 +msgid "" +"%s: detect bootloader, kernel and drivers inside guest\n" +"\n" +"A short summary of the options is given below. For detailed help please\n" +"read the man page virt-drivers(1).\n" +msgstr "" + +#: common/mltools/tools_utils.ml:172 msgid "%s: error: %s" msgstr "" -#: get-kernel/get_kernel.ml:66 +#: get-kernel/get_kernel.ml:67 msgid "" "%s: extract kernel and ramdisk from a guest\n" "\n" @@ -240,52 +256,52 @@ msgid "" "read the man page virt-get-kernel(1).\n" msgstr "" -#: resize/resize.ml:415 resize/resize.ml:412 +#: resize/resize.ml:421 resize/resize.ml:418 msgid "%s: file is too small to be a disk image (%Ld bytes)" msgstr "" -#: builder/index_parser.ml:76 +#: builder/index_parser.ml:81 msgid "%s: index is corrupt: %s: field ‘%s[%s]’ appears two or more times\n" msgstr "" -#: builder/index_parser.ml:78 +#: builder/index_parser.ml:84 msgid "%s: index is corrupt: %s: field ‘%s’ appears two or more times\n" msgstr "" -#: builder/index_parser.ml:60 +#: builder/index_parser.ml:63 msgid "" "%s: index is corrupt: os-version ‘%s’ with architecture ‘%s’ appears two or " "more times\n" msgstr "" -#: resize/resize.ml:852 +#: resize/resize.ml:890 msgid "" "%s: logical volume not found in the source disk image (this error came from " "‘--lv-expand’ option on the command line). Try running this command: virt-" "filesystems --logical-volumes --long -a %s" msgstr "" -#: resize/resize.ml:725 +#: resize/resize.ml:757 msgid "%s: missing size field in ‘%s’ option" msgstr "" -#: resize/resize.ml:734 +#: resize/resize.ml:766 msgid "%s: new partition size is zero or negative" msgstr "" -#: builder/index_parser.ml:109 +#: builder/index_parser.ml:118 msgid "%s: no ‘arch’ entry for %s and failed to guess it\n" msgstr "" -#: builder/index_parser.ml:116 +#: builder/index_parser.ml:126 msgid "%s: no ‘arch’ entry for ‘%s’\n" msgstr "" -#: builder/index_parser.ml:97 +#: builder/index_parser.ml:106 msgid "%s: no ‘file’ (URI) entry for ‘%s’\n" msgstr "" -#: builder/index_parser.ml:155 +#: builder/index_parser.ml:167 msgid "%s: no ‘size’ field for ‘%s’\n" msgstr "" @@ -293,38 +309,38 @@ msgstr "" msgid "%s: no ‘uri’ entry for ‘%s’ in %s, skipping it\n" msgstr "" -#: common/mltools/tools_utils.ml:714 +#: common/mltools/tools_utils.ml:717 msgid "%s: operation timed out" msgstr "" -#: resize/resize.ml:646 +#: resize/resize.ml:657 msgid "%s: partition already deleted, you cannot use it in ‘%s’ option" msgstr "" -#: resize/resize.ml:642 +#: resize/resize.ml:652 msgid "%s: partition already ignored, you cannot use it in ‘%s’ option" msgstr "" -#: resize/resize.ml:638 +#: resize/resize.ml:645 msgid "" "%s: partition not found in the source disk image (this error came from ‘%s’ " "option on the command line). Try running this command: virt-filesystems --" "partitions --long -a %s" msgstr "" -#: resize/resize.ml:543 +#: resize/resize.ml:550 msgid "%s: partition size %Ld < filesystem size %Ld" msgstr "" -#: resize/resize.ml:538 +#: resize/resize.ml:545 msgid "%s: partition size %Ld < physical volume size %Ld" msgstr "" -#: resize/resize.ml:450 +#: resize/resize.ml:457 msgid "%s: physical volume not returned by pvs_full" msgstr "" -#: sysprep/main.ml:141 +#: sysprep/main.ml:142 msgid "" "%s: reset or unconfigure a virtual machine so clones can be made\n" "\n" @@ -336,7 +352,7 @@ msgid "" "read the man page virt-sysprep(1).\n" msgstr "" -#: resize/resize.ml:219 +#: resize/resize.ml:221 msgid "" "%s: resize a virtual machine disk\n" "\n" @@ -366,63 +382,63 @@ msgid "" "read the man page virt-sparsify(1).\n" msgstr "" -#: builder/builder.ml:322 +#: builder/builder.ml:339 msgid "" "%s: template not downloaded or deleted. You may have run ‘virt-builder --" "delete-cache’ in parallel." msgstr "" -#: resize/resize.ml:680 +#: resize/resize.ml:692 msgid "%s: this partition has already been ignored or deleted" msgstr "" -#: resize/resize.ml:676 +#: resize/resize.ml:688 msgid "%s: this partition has already been marked for resizing" msgstr "" -#: resize/resize.ml:553 +#: resize/resize.ml:560 msgid "%s: this partition overlaps the previous one" msgstr "" -#: resize/resize.ml:427 +#: resize/resize.ml:433 msgid "" "%s: unknown partition table type\n" "virt-resize only supports MBR (DOS) and GPT partition tables." msgstr "" -#: common/mltools/tools_utils.ml:190 +#: common/mltools/tools_utils.ml:191 msgid "%s: warning: %s" msgstr "" -#: builder/index_parser.ml:250 +#: builder/index_parser.ml:265 msgid "%s: you must use relative paths (not ‘%s’) in the index file\n" msgstr "" -#: builder/index_parser.ml:242 +#: builder/index_parser.ml:257 msgid "%s: zero length path in the index file\n" msgstr "" -#. common/mlcustomize/customize_cmdline.ml:331 -#. common/mlcustomize/customize_cmdline.ml:240 -#: customize/customize_cmdline.ml:331 customize/customize_cmdline.ml:240 +#. common/mlcustomize/customize_cmdline.ml:351 +#. common/mlcustomize/customize_cmdline.ml:248 +#: customize/customize_cmdline.ml:351 customize/customize_cmdline.ml:248 msgid "'CMD+ARGS'" msgstr "" -#: get-kernel/get_kernel.ml:40 +#: get-kernel/get_kernel.ml:40 drivers/drivers.ml:36 msgid "--add option can only be given once" msgstr "" -#: customize/customize_run.ml:206 +#: customize/customize_run.ml:141 msgid "" "--append-line: line must not contain newline characters. Use the --append-" "line option multiple times to add several lines." msgstr "" -#: customize/customize_main.ml:112 +#: customize/customize_main.ml:116 msgid "--attach-format parameter must appear before --attach parameter" msgstr "" -#: builder/cmdline.ml:266 +#: builder/cmdline.ml:270 msgid "" "--cache-all-templates/--print-cache/--delete-cache does not need any extra " "arguments" @@ -432,7 +448,7 @@ msgstr "" msgid "--check-tmpdir: unknown argument ‘%s’" msgstr "" -#: sparsify/copying.ml:73 +#: sparsify/copying.ml:74 msgid "" "--compress cannot be used for raw output. Remove this option or use --" "convert qcow2." @@ -442,52 +458,60 @@ msgstr "" msgid "--debug parameter must be >= 0" msgstr "" -#: sysprep/main.ml:66 get-kernel/get_kernel.ml:48 -#: customize/customize_main.ml:70 +#. customize/customize_main.ml:74 +#: sysprep/main.ml:68 get-kernel/get_kernel.ml:49 drivers/drivers.ml:45 msgid "--domain option can only be given once" msgstr "" -#: sysprep/main.ml:76 +#: sysprep/main.ml:78 msgid "--enable option can only be given once" msgstr "" -#: sysprep/main.ml:84 +#: sysprep/main.ml:86 msgid "--enable: ‘%s’ is not a known operation" msgstr "" -#: resize/resize.ml:173 +#: resize/resize.ml:174 msgid "--expand option given more than once" msgstr "" -#: sysprep/main.ml:156 customize/customize_main.ml:109 +#: sysprep/main.ml:157 customize/customize_main.ml:113 msgid "--format parameter must appear before -a parameter" msgstr "" -#: builder/cmdline.ml:274 +#: builder/cmdline.ml:280 msgid "--get-kernel: too many parameters" msgstr "" -#: customize/customize_run.ml:101 customize/customize_run.ml:99 -msgid "--install" +#: customize/customize_run.ml:214 +msgid "" +"--inject-qemu-ga: QEMU Guest Agent MSI not found in virtio-win source that " +"you specified" +msgstr "" + +#: customize/customize_run.ml:230 +msgid "" +"--inject-virtio-win: virtio drivers were not found for this Windows version " +"in the virtio-win source that you specified" msgstr "" -#: builder/cmdline.ml:245 +#: builder/cmdline.ml:247 msgid "--list: use ‘--list-format’, not ‘--format’" msgstr "" -#: builder/cmdline.ml:258 +#: builder/cmdline.ml:262 msgid "--notes: too many parameters, expecting ‘os-version’" msgstr "" -#: sysprep/main.ml:103 +#: sysprep/main.ml:105 msgid "--operations: empty operation name" msgstr "" -#: sysprep/main.ml:114 +#: sysprep/main.ml:117 msgid "--operations: ‘%s’ is not a known operation" msgstr "" -#: get-kernel/get_kernel.ml:52 +#: get-kernel/get_kernel.ml:53 msgid "--prefix option can only be given once" msgstr "" @@ -495,41 +519,33 @@ msgstr "" msgid "--scriptdir cannot be used more than once" msgstr "" -#: resize/resize.ml:188 +#: resize/resize.ml:190 msgid "--shrink option given more than once" msgstr "" -#: sparsify/copying.ml:93 +#: sparsify/copying.ml:95 msgid "" "--tmp parameter must point to a directory, block device or prebuilt file" msgstr "" -#: sparsify/copying.ml:84 +#: sparsify/copying.ml:86 msgid "--tmp prebuilt:file: %s: file does not exist" msgstr "" -#: sparsify/copying.ml:89 +#: sparsify/copying.ml:91 msgid "--tmp prebuilt:file: %s: file does not have backing file" msgstr "" -#: sparsify/copying.ml:87 +#: sparsify/copying.ml:89 msgid "--tmp prebuilt:file: %s: file format is not qcow2" msgstr "" -#: customize/customize_run.ml:155 customize/customize_run.ml:153 -msgid "--uninstall" -msgstr "" - -#: customize/customize_run.ml:131 customize/customize_run.ml:129 -msgid "--update" -msgstr "" - #: dib/cmdline.ml:241 msgid "-B must be specified" msgstr "" -#: sysprep/main.ml:123 get-kernel/get_kernel.ml:56 -#: customize/customize_main.ml:75 +#. customize/customize_main.ml:79 +#: sysprep/main.ml:126 get-kernel/get_kernel.ml:57 drivers/drivers.ml:50 msgid "Add disk image file" msgstr "" @@ -545,13 +561,13 @@ msgstr "" msgid "Add new a elements location" msgstr "" -#: customize/customize_cmdline.ml:269 -#: common/mlcustomize/customize_cmdline.ml:269 +#: customize/customize_cmdline.ml:289 +#: common/mlcustomize/customize_cmdline.ml:289 msgid "Add package(s) to install" msgstr "" -#: customize/customize_cmdline.ml:252 -#: common/mlcustomize/customize_cmdline.ml:252 +#: customize/customize_cmdline.ml:260 +#: common/mlcustomize/customize_cmdline.ml:260 msgid "Add package(s) to install at first boot" msgstr "" @@ -563,24 +579,24 @@ msgstr "" msgid "Aliases:" msgstr "" -#: resize/resize.ml:195 +#: resize/resize.ml:197 msgid "Align first partition (default: auto)" msgstr "" -#: builder/repository_main.ml:214 +#: builder/repository_main.ml:216 msgid "Allowed characters are letters, digits, - _ and ." msgstr "" -#: builder/repository_main.ml:277 +#: builder/repository_main.ml:282 msgid "Already existing image with id %s and architecture %s" msgstr "" -#: customize/customize_cmdline.ml:168 -#: common/mlcustomize/customize_cmdline.ml:168 +#: customize/customize_cmdline.ml:176 +#: common/mlcustomize/customize_cmdline.ml:176 msgid "Append line(s) to the file" msgstr "" -#: customize/customize_run.ml:208 +#: customize/customize_run.ml:145 msgid "Appending line to %s" msgstr "" @@ -588,7 +604,7 @@ msgstr "" msgid "Architecture:" msgstr "" -#: builder/repository_main.ml:221 +#: builder/repository_main.ml:224 msgid "Architecture: " msgstr "" @@ -596,20 +612,20 @@ msgstr "" msgid "Ask the user about missing data" msgstr "" -#: customize/customize_main.ml:76 builder/cmdline.ml:130 +#: customize/customize_main.ml:80 builder/cmdline.ml:130 msgid "Attach data disk/ISO during install" msgstr "" -#: customize/customize_cmdline.ml:349 -#: common/mlcustomize/customize_cmdline.ml:349 +#: customize/customize_cmdline.ml:369 +#: common/mlcustomize/customize_cmdline.ml:369 msgid "Attach to a subscription-manager pool" msgstr "" -#: customize/customize_run.ml:310 +#: customize/customize_run.ml:274 msgid "Attaching to compatible subscriptions" msgstr "" -#: customize/customize_run.ml:314 +#: customize/customize_run.ml:278 msgid "Attaching to the pool %s" msgstr "" @@ -617,13 +633,13 @@ msgstr "" msgid "Base path of diskimage-builder library" msgstr "" -#: sparsify/copying.ml:344 +#: sparsify/copying.ml:348 msgid "" "Before deleting the old disk, carefully check that the target disk boots and " "works correctly." msgstr "" -#: resize/resize.ml:214 +#: resize/resize.ml:216 msgid "Behaviour on expand unknown filesystems (default: warn)" msgstr "" @@ -648,7 +664,7 @@ msgstr "" msgid "Carry/set this environment variable" msgstr "" -#: sysprep/sysprep_operation_lvm_uuids.ml:44 +#: sysprep/sysprep_operation_lvm_uuids.ml:84 msgid "Change LVM2 PV and VG UUIDs" msgstr "" @@ -656,12 +672,12 @@ msgstr "" msgid "Change filesystem UUIDs" msgstr "" -#: customize/customize_cmdline.ml:179 -#: common/mlcustomize/customize_cmdline.ml:179 +#: customize/customize_cmdline.ml:187 +#: common/mlcustomize/customize_cmdline.ml:187 msgid "Change the permissions of a file" msgstr "" -#: customize/customize_run.ml:212 +#: customize/customize_run.ml:149 msgid "Changing permissions of %s to %s" msgstr "" @@ -673,18 +689,19 @@ msgstr "" msgid "Check there is enough space in $TMPDIR" msgstr "" -#: builder/repository_main.ml:200 +#: builder/repository_main.ml:202 msgid "" "Choose one from the list below:\n" " %s\n" msgstr "" -#: sparsify/in_place.ml:124 sparsify/copying.ml:275 +#: sparsify/in_place.ml:127 sparsify/copying.ml:279 msgid "Clearing Linux swap on %s" msgstr "" -#: sysprep/main.ml:136 -msgid "Compatibility option, does nothing" +#: customize/customize_cmdline.ml:490 +#: common/mlcustomize/customize_cmdline.ml:490 +msgid "Compatibility option doing nothing" msgstr "" #: sparsify/cmdline.ml:69 @@ -703,11 +720,11 @@ msgstr "" msgid "Compressing the image as tar.gz" msgstr "" -#: builder/builder.ml:683 +#: builder/builder.ml:710 msgid "Converting %s to %s" msgstr "" -#: builder/builder.ml:682 +#: builder/builder.ml:709 msgid "Converting to %s" msgstr "" @@ -719,56 +736,56 @@ msgstr "" msgid "Converting to qcow2" msgstr "" -#: customize/customize_cmdline.ml:201 -#: common/mlcustomize/customize_cmdline.ml:201 +#: customize/customize_cmdline.ml:209 +#: common/mlcustomize/customize_cmdline.ml:209 msgid "Copy files in disk image" msgstr "" -#: customize/customize_cmdline.ml:212 -#: common/mlcustomize/customize_cmdline.ml:212 +#: customize/customize_cmdline.ml:220 +#: common/mlcustomize/customize_cmdline.ml:220 msgid "Copy local files or directories into image" msgstr "" -#: builder/builder.ml:618 +#: builder/builder.ml:643 msgid "Copying" msgstr "" -#: resize/resize.ml:1246 +#: resize/resize.ml:1301 msgid "Copying %s" msgstr "" -#: customize/customize_run.ml:229 +#: customize/customize_run.ml:166 msgid "Copying (in image): %s to %s" msgstr "" -#: customize/customize_run.ml:233 +#: customize/customize_run.ml:170 msgid "Copying: %s to %s" msgstr "" -#: customize/customize_cmdline.ml:286 -#: common/mlcustomize/customize_cmdline.ml:286 +#: customize/customize_cmdline.ml:306 +#: common/mlcustomize/customize_cmdline.ml:306 msgid "Create a directory" msgstr "" -#: sparsify/copying.ml:149 +#: sparsify/copying.ml:152 msgid "Create overlay device %s to protect source disk" msgstr "" -#: sparsify/copying.ml:147 +#: sparsify/copying.ml:150 msgid "Create overlay file in %s to protect source disk" msgstr "" -#: customize/customize_cmdline.ml:280 -#: common/mlcustomize/customize_cmdline.ml:280 +#: customize/customize_cmdline.ml:300 +#: common/mlcustomize/customize_cmdline.ml:300 msgid "Create symbolic links" msgstr "" -#: builder/repository_main.ml:559 +#: builder/repository_main.ml:566 msgid "Creating index backup copy" msgstr "" -#: customize/customize_cmdline.ml:474 -#: common/mlcustomize/customize_cmdline.ml:474 +#: customize/customize_cmdline.ml:500 +#: common/mlcustomize/customize_cmdline.ml:500 msgid "Credentials for subscription-manager" msgstr "" @@ -796,17 +813,17 @@ msgid "" "for installing packages, editing files and so on." msgstr "" -#: customize/customize_cmdline.ml:285 -#: common/mlcustomize/customize_cmdline.ml:285 +#: customize/customize_cmdline.ml:305 +#: common/mlcustomize/customize_cmdline.ml:305 msgid "DIR" msgstr "" -#: customize/customize_cmdline.ml:218 -#: common/mlcustomize/customize_cmdline.ml:218 +#: customize/customize_cmdline.ml:226 +#: common/mlcustomize/customize_cmdline.ml:226 msgid "Delete a file or directory" msgstr "" -#: resize/resize.ml:199 +#: resize/resize.ml:201 msgid "Delete partition" msgstr "" @@ -814,15 +831,15 @@ msgstr "" msgid "Delete the template cache" msgstr "" -#: customize/customize_run.ml:237 builder/builder.ml:138 +#: customize/customize_run.ml:174 builder/builder.ml:139 msgid "Deleting: %s" msgstr "" -#: dib/cmdline.ml:188 customize/customize_main.ml:85 builder/cmdline.ml:158 +#: dib/cmdline.ml:188 customize/customize_main.ml:89 builder/cmdline.ml:158 msgid "Disable appliance network" msgstr "" -#: sysprep/main.ml:134 +#: sysprep/main.ml:137 msgid "Disable appliance network (default)" msgstr "" @@ -834,7 +851,7 @@ msgstr "" msgid "Disable template cache" msgstr "" -#: sparsify/in_place.ml:159 +#: sparsify/in_place.ml:163 msgid "Discard space in volgroup %s" msgstr "" @@ -846,11 +863,11 @@ msgstr "" msgid "Display installation notes" msgstr "" -#: builder/repository_main.ml:284 +#: builder/repository_main.ml:290 msgid "Display name: " msgstr "" -#: common/mltools/tools_utils.ml:384 +#: common/mltools/tools_utils.ml:385 msgid "Display version and exit" msgstr "" @@ -862,6 +879,11 @@ msgstr "" msgid "Do not fsync output file on exit" msgstr "" +#: customize/customize_cmdline.ml:484 +#: common/mlcustomize/customize_cmdline.ml:484 +msgid "Do not relabel files with correct SELinux labels" +msgstr "" + #: builder/cmdline.ml:168 msgid "Do not warn if writing to a partition" msgstr "" @@ -874,11 +896,11 @@ msgstr "" msgid "Don’t compress the new images in the index" msgstr "" -#: resize/resize.ml:197 +#: resize/resize.ml:199 msgid "Don’t copy boot loader" msgstr "" -#: resize/resize.ml:202 +#: resize/resize.ml:204 msgid "Don’t create extra partition" msgstr "" @@ -886,19 +908,19 @@ msgstr "" msgid "Don’t delete output file on failure" msgstr "" -#: resize/resize.ml:201 +#: resize/resize.ml:203 msgid "Don’t expand content" msgstr "" -#: resize/resize.ml:206 +#: resize/resize.ml:208 msgid "Don’t perform changes" msgstr "" -#: common/mltools/tools_utils.ml:388 +#: common/mltools/tools_utils.ml:389 msgid "Don’t print progress messages" msgstr "" -#: common/mltools/tools_utils.ml:405 +#: common/mltools/tools_utils.ml:420 msgid "Don’t turn off echo for passphrases" msgstr "" @@ -910,16 +932,16 @@ msgstr "" msgid "Download size:" msgstr "" -#: builder/builder.ml:304 builder/builder.ml:256 +#: builder/builder.ml:315 builder/builder.ml:263 msgid "Downloading: %s" msgstr "" -#: customize/customize_cmdline.ml:229 -#: common/mlcustomize/customize_cmdline.ml:229 +#: customize/customize_cmdline.ml:237 +#: common/mlcustomize/customize_cmdline.ml:237 msgid "Edit file using Perl expression" msgstr "" -#: customize/customize_run.ml:241 +#: customize/customize_run.ml:178 msgid "Editing: %s" msgstr "" @@ -927,43 +949,43 @@ msgstr "" msgid "Elements: %s" msgstr "" -#: sysprep/main.ml:133 +#: sysprep/main.ml:136 msgid "Enable appliance network" msgstr "" -#: dib/cmdline.ml:187 customize/customize_main.ml:84 builder/cmdline.ml:157 +#: dib/cmdline.ml:187 customize/customize_main.ml:88 builder/cmdline.ml:157 msgid "Enable appliance network (default)" msgstr "" -#: resize/resize.ml:198 +#: resize/resize.ml:200 msgid "Enable debugging messages" msgstr "" -#: common/mltools/tools_utils.ml:385 +#: common/mltools/tools_utils.ml:386 msgid "Enable libguestfs debugging messages" msgstr "" -#: sysprep/main.ml:129 +#: sysprep/main.ml:132 msgid "Enable specific operations" msgstr "" -#: common/mltools/tools_utils.ml:386 +#: common/mltools/tools_utils.ml:387 msgid "Enable tracing of libguestfs calls" msgstr "" -#: sysprep/main.ml:137 +#: sysprep/main.ml:138 msgid "Enable/disable specific operations" msgstr "" -#: sparsify/copying.ml:177 +#: sparsify/copying.ml:180 msgid "Examine source disk" msgstr "" -#: resize/resize.ml:379 +#: resize/resize.ml:385 msgid "Examining %s" msgstr "" -#: sysprep/main.ml:209 customize/customize_main.ml:155 +#: sysprep/main.ml:213 customize/customize_main.ml:161 msgid "Examining the guest ..." msgstr "" @@ -975,19 +997,19 @@ msgstr "" msgid "Exclude the specified script" msgstr "" -#: resize/resize.ml:205 +#: resize/resize.ml:207 msgid "Expand logical volume" msgstr "" -#: resize/resize.ml:200 +#: resize/resize.ml:202 msgid "Expand partition" msgstr "" -#: builder/repository_main.ml:312 builder/repository_main.ml:305 +#: builder/repository_main.ml:318 builder/repository_main.ml:311 msgid "Expandable partition: " msgstr "" -#: builder/repository_main.ml:331 builder/repository_main.ml:324 +#: builder/repository_main.ml:337 builder/repository_main.ml:330 msgid "Expandable volume: " msgstr "" @@ -995,15 +1017,15 @@ msgstr "" msgid "Expanded elements: %s" msgstr "" -#: resize/resize.ml:1413 +#: resize/resize.ml:1469 msgid "Expanding %s using the ‘%s’ method" msgstr "" -#: resize/resize.ml:1394 +#: resize/resize.ml:1450 msgid "Expanding %s%s using the ‘%s’ method" msgstr "" -#: builder/repository_main.ml:232 +#: builder/repository_main.ml:236 msgid "Extracting data from the image..." msgstr "" @@ -1011,40 +1033,40 @@ msgstr "" msgid "Extracting data out of the image" msgstr "" -#. customize/customize_cmdline.ml:337 -#. common/mlcustomize/customize_cmdline.ml:402 -#. common/mlcustomize/customize_cmdline.ml:384 -#. common/mlcustomize/customize_cmdline.ml:337 -#: customize/customize_cmdline.ml:402 customize/customize_cmdline.ml:384 +#. customize/customize_cmdline.ml:357 +#. common/mlcustomize/customize_cmdline.ml:422 +#. common/mlcustomize/customize_cmdline.ml:404 +#. common/mlcustomize/customize_cmdline.ml:357 +#: customize/customize_cmdline.ml:422 customize/customize_cmdline.ml:404 msgid "FILE" msgstr "" -#: customize/customize_cmdline.ml:437 -#: common/mlcustomize/customize_cmdline.ml:437 +#: customize/customize_cmdline.ml:457 +#: common/mlcustomize/customize_cmdline.ml:457 msgid "FILE:CONTENT" msgstr "" -#: customize/customize_cmdline.ml:426 -#: common/mlcustomize/customize_cmdline.ml:426 +#: customize/customize_cmdline.ml:446 +#: common/mlcustomize/customize_cmdline.ml:446 msgid "FILE:DEST" msgstr "" -#: customize/customize_cmdline.ml:224 -#: common/mlcustomize/customize_cmdline.ml:224 +#: customize/customize_cmdline.ml:232 +#: common/mlcustomize/customize_cmdline.ml:232 msgid "FILE:EXPR" msgstr "" -#: customize/customize_cmdline.ml:163 -#: common/mlcustomize/customize_cmdline.ml:163 +#: customize/customize_cmdline.ml:171 +#: common/mlcustomize/customize_cmdline.ml:171 msgid "FILE:LINE" msgstr "" -#: customize/customize_cmdline.ml:185 -#: common/mlcustomize/customize_cmdline.ml:185 +#: customize/customize_cmdline.ml:193 +#: common/mlcustomize/customize_cmdline.ml:193 msgid "FILENAME" msgstr "" -#: resize/resize.ml:1041 +#: resize/resize.ml:1092 msgid "" "Failed to initialize the partition table on the target disk. You need to " "wipe or recreate the target disk and then run virt-resize again.\n" @@ -1056,11 +1078,11 @@ msgstr "" msgid "Filesystem for the image" msgstr "" -#: sparsify/copying.ml:260 +#: sparsify/copying.ml:264 msgid "Fill free space in %s with zero" msgstr "" -#: sparsify/copying.ml:308 +#: sparsify/copying.ml:312 msgid "Fill free space in volgroup %s with zero" msgstr "" @@ -1072,11 +1094,11 @@ msgstr "" msgid "Fingerprint: %s\n" msgstr "" -#: customize/customize_main.ml:198 builder/builder.ml:768 +#: customize/customize_main.ml:208 builder/builder.ml:797 msgid "Finishing off" msgstr "" -#: resize/resize.ml:1292 +#: resize/resize.ml:1348 msgid "Fixing first NTFS partition boot record" msgstr "" @@ -1084,8 +1106,8 @@ msgstr "" msgid "Flag the system for reconfiguration" msgstr "" -#. sysprep/sysprep_operation_net_hostname.ml:54 -#: sysprep/sysprep_operation_net_hwaddr.ml:52 +#. sysprep/sysprep_operation_net_hostname.ml:56 +#: sysprep/sysprep_operation_net_hwaddr.ml:53 msgid "" "For Fedora and Red Hat Enterprise Linux,\n" "this is removed from C files." @@ -1098,15 +1120,16 @@ msgid "" "as the root password and timezone." msgstr "" -#: resize/resize.ml:207 +#: resize/resize.ml:209 msgid "Force ntfsresize" msgstr "" -#: resize/resize.ml:210 +#: resize/resize.ml:212 msgid "Forcefully resize partition" msgstr "" -#: sparsify/cmdline.ml:71 resize/resize.ml:203 get-kernel/get_kernel.ml:60 +#. drivers/drivers.ml:54 +#: sparsify/cmdline.ml:71 resize/resize.ml:205 get-kernel/get_kernel.ml:61 msgid "Format of input disk" msgstr "" @@ -1114,7 +1137,7 @@ msgstr "" msgid "Format of optional drive" msgstr "" -#: resize/resize.ml:208 +#: resize/resize.ml:210 msgid "Format of output disk" msgstr "" @@ -1122,11 +1145,11 @@ msgstr "" msgid "Format of output disk (default: same as input)" msgstr "" -#: builder/repository_main.ml:494 +#: builder/repository_main.ml:501 msgid "Found new images: %s" msgstr "" -#: builder/builder.ml:758 +#: builder/builder.ml:787 msgid "Free space" msgstr "" @@ -1134,25 +1157,25 @@ msgstr "" msgid "Full name:" msgstr "" -#: builder/sigchecker.ml:111 +#: builder/sigchecker.ml:114 msgid "" "GPG failure: could not run GPG the first time\n" "Use the ‘-v’ option and look for earlier error messages." msgstr "" -#: builder/sigchecker.ml:65 +#: builder/sigchecker.ml:66 msgid "" "GPG failure: could not trust the imported key\n" "Use the ‘-v’ option and look for earlier error messages." msgstr "" -#: builder/sigchecker.ml:204 +#: builder/sigchecker.ml:215 msgid "" "GPG failure: could not verify digital signature of file\n" "Try:\n" " - Use the ‘-v’ option and look for earlier error messages.\n" -" - Delete the cache: virt-builder --delete-cache\n" -" - Check no one has tampered with the website or your network!" +"- Delete the cache: virt-builder --delete-cache\n" +"- Check no one has tampered with the website or your network!" msgstr "" #: dib/cmdline.ml:172 @@ -1167,8 +1190,8 @@ msgstr "" msgid "Get kernel from image" msgstr "" -#: customize/customize_cmdline.ml:257 -#: common/mlcustomize/customize_cmdline.ml:257 +#: customize/customize_cmdline.ml:265 +#: common/mlcustomize/customize_cmdline.ml:265 msgid "HOSTNAME" msgstr "" @@ -1176,11 +1199,11 @@ msgstr "" msgid "ID of the GPG key to sign the repo with" msgstr "" -#: builder/repository_main.ml:212 +#: builder/repository_main.ml:214 msgid "Identifier: " msgstr "" -#: common/mltools/tools_utils.ml:176 +#: common/mltools/tools_utils.ml:177 msgid "" "If reporting bugs, run %s with debugging enabled and include the complete " "output:\n" @@ -1192,7 +1215,7 @@ msgstr "" msgid "Ignore filesystem" msgstr "" -#: resize/resize.ml:204 +#: resize/resize.ml:206 msgid "Ignore partition" msgstr "" @@ -1200,32 +1223,42 @@ msgstr "" msgid "Importing the image to docker as ‘%s’" msgstr "" -#: sysprep/sysprep_operation_ca_certificates.ml:55 +#: sysprep/sysprep_operation_ca_certificates.ml:56 msgid "In case any certificate is removed, the system CA store is updated." msgstr "" -#: customize/customize_cmdline.ml:379 -#: common/mlcustomize/customize_cmdline.ml:379 +#: customize/customize_cmdline.ml:399 +#: common/mlcustomize/customize_cmdline.ml:399 msgid "Inject a public key into the guest" msgstr "" +#: customize/customize_cmdline.ml:272 +#: common/mlcustomize/customize_cmdline.ml:272 +msgid "Inject the QEMU Guest Agent into a Windows guest" +msgstr "" + +#: customize/customize_cmdline.ml:278 +#: common/mlcustomize/customize_cmdline.ml:278 +msgid "Inject virtio-win drivers into a Windows guest" +msgstr "" + #: dib/cmdline.ml:166 msgid "Installation type" msgstr "" -#: customize/customize_run.ml:252 +#: customize/customize_run.ml:189 msgid "Installing firstboot command: %s" msgstr "" -#: customize/customize_run.ml:256 +#: customize/customize_run.ml:193 msgid "Installing firstboot packages: %s" msgstr "" -#: customize/customize_run.ml:263 +#: customize/customize_run.ml:200 msgid "Installing firstboot script: %s" msgstr "" -#: customize/customize_run.ml:273 +#: customize/customize_run.ml:237 msgid "Installing packages: %s" msgstr "" @@ -1237,8 +1270,8 @@ msgstr "" msgid "Key: %s\n" msgstr "" -#: customize/customize_cmdline.ml:207 -#: common/mlcustomize/customize_cmdline.ml:207 +#: customize/customize_cmdline.ml:215 +#: common/mlcustomize/customize_cmdline.ml:215 msgid "LOCALPATH:REMOTEDIR" msgstr "" @@ -1246,7 +1279,7 @@ msgstr "" msgid "Label for the root fs" msgstr "" -#: customize/customize_run.ml:280 +#: customize/customize_run.ml:244 msgid "Linking: %s -> %s" msgstr "" @@ -1254,7 +1287,7 @@ msgstr "" msgid "List available templates" msgstr "" -#: sysprep/main.ml:131 +#: sysprep/main.ml:134 msgid "List supported operations" msgstr "" @@ -1262,15 +1295,21 @@ msgstr "" msgid "Location for cached images" msgstr "" +#. common/mlcustomize/customize_cmdline.ml:277 +#. common/mlcustomize/customize_cmdline.ml:271 +#: customize/customize_cmdline.ml:277 customize/customize_cmdline.ml:271 +msgid "METHOD" +msgstr "" + #: dib/cmdline.ml:176 msgid "Main element for building ramdisks" msgstr "" -#: common/mltools/tools_utils.ml:411 +#: common/mltools/tools_utils.ml:426 msgid "Make output machine readable" msgstr "" -#: customize/customize_run.ml:285 +#: customize/customize_run.ml:249 msgid "Making directory: %s" msgstr "" @@ -1282,20 +1321,20 @@ msgstr "" msgid "Modify the disk image in-place" msgstr "" -#: sysprep/sysprep_operation_script.ml:135 +#: sysprep/sysprep_operation_script.ml:137 msgid "Mount point on host" msgstr "" -#: customize/customize_cmdline.ml:297 -#: common/mlcustomize/customize_cmdline.ml:297 +#: customize/customize_cmdline.ml:317 +#: common/mlcustomize/customize_cmdline.ml:317 msgid "Move files in disk image" msgstr "" -#: builder/repository_main.ml:568 +#: builder/repository_main.ml:575 msgid "Moving files to final destination" msgstr "" -#: customize/customize_run.ml:289 +#: customize/customize_run.ml:253 msgid "Moving: %s -> %s" msgstr "" @@ -1303,7 +1342,7 @@ msgstr "" msgid "Name of the image" msgstr "" -#: builder/repository_main.ml:490 +#: builder/repository_main.ml:497 msgid "No new image found" msgstr "" @@ -1322,13 +1361,19 @@ msgstr "" msgid "On Fedora and Red Hat Enterprise Linux, remove the C<" msgstr "" -#: sysprep/sysprep_operation_lvm_uuids.ml:45 +#: sysprep/sysprep_operation_lvm_uuids.ml:85 msgid "" "On Linux guests that have LVM2 physical volumes (PVs) or volume groups " "(VGs),\n" "new random UUIDs are generated and assigned to those PVs and VGs." msgstr "" +#: sysprep/sysprep_operation_lvm_system_devices.ml:36 +msgid "" +"On Linux guests, LVM2's scanning for physical volumes (PVs) may be " +"restricted to those block devices whose WWIDs are listed in C<" +msgstr "" + #. sysprep/sysprep_operation_logfiles.ml:149 #: sysprep/sysprep_operation_passwd_backups.ml:48 msgid "" @@ -1343,7 +1388,7 @@ msgid "" "new random UUIDs are generated and assigned to filesystems." msgstr "" -#: common/mlcustomize/firstboot.ml:253 +#: common/mlcustomize/firstboot.ml:254 msgid "" "One of rhsrvany.exe or pvvxsvc.exe is missing in %s. One of them is " "required in order to install Windows firstboot scripts. You can get one by " @@ -1354,7 +1399,7 @@ msgstr "" msgid "Opening the disks" msgstr "" -#: builder/builder.ml:695 +#: builder/builder.ml:722 msgid "Opening the new disk" msgstr "" @@ -1366,15 +1411,15 @@ msgstr "" msgid "Output architecture" msgstr "" -#: get-kernel/get_kernel.ml:61 +#: get-kernel/get_kernel.ml:62 msgid "Output directory" msgstr "" -#: builder/builder.ml:753 +#: builder/builder.ml:782 msgid "Output file" msgstr "" -#: builder/builder.ml:755 +#: builder/builder.ml:784 msgid "Output format" msgstr "" @@ -1386,26 +1431,26 @@ msgstr "" msgid "Output formats" msgstr "" -#: builder/builder.ml:754 +#: builder/builder.ml:783 msgid "Output size" msgstr "" -#. common/mlcustomize/customize_cmdline.ml:390 -#. common/mlcustomize/customize_cmdline.ml:217 -#: customize/customize_cmdline.ml:390 customize/customize_cmdline.ml:217 +#. common/mlcustomize/customize_cmdline.ml:410 +#. common/mlcustomize/customize_cmdline.ml:225 +#: customize/customize_cmdline.ml:410 customize/customize_cmdline.ml:225 msgid "PATH" msgstr "" -#: customize/customize_cmdline.ml:174 -#: common/mlcustomize/customize_cmdline.ml:174 +#: customize/customize_cmdline.ml:182 +#: common/mlcustomize/customize_cmdline.ml:182 msgid "PERMISSIONS:FILE" msgstr "" -#. customize/customize_cmdline.ml:247 -#. common/mlcustomize/customize_cmdline.ml:409 -#. common/mlcustomize/customize_cmdline.ml:264 -#. common/mlcustomize/customize_cmdline.ml:247 -#: customize/customize_cmdline.ml:409 customize/customize_cmdline.ml:264 +#. customize/customize_cmdline.ml:255 +#. common/mlcustomize/customize_cmdline.ml:429 +#. common/mlcustomize/customize_cmdline.ml:284 +#. common/mlcustomize/customize_cmdline.ml:255 +#: customize/customize_cmdline.ml:429 customize/customize_cmdline.ml:284 msgid "PKG,PKG.." msgstr "" @@ -1417,23 +1462,23 @@ msgstr "" msgid "POD notes for %s must not end with newline" msgstr "" -#: sysprep/main.ml:126 customize/customize_main.ml:81 +#: sysprep/main.ml:129 customize/customize_main.ml:85 msgid "Perform a dry run" msgstr "" -#: sysprep/sysprep_operation.ml:318 sysprep/sysprep_operation.ml:297 +#: sysprep/sysprep_operation.ml:319 sysprep/sysprep_operation.ml:298 msgid "Performing %S ..." msgstr "" -#: builder/builder.ml:556 +#: builder/builder.ml:578 msgid "Planning how to build this image" msgstr "" -#: get-kernel/get_kernel.ml:63 +#: get-kernel/get_kernel.ml:64 msgid "Prefix for files" msgstr "" -#: builder/repository_main.ml:184 +#: builder/repository_main.ml:186 msgid "Preparing %s" msgstr "" @@ -1445,38 +1490,33 @@ msgstr "" msgid "Print info about template cache" msgstr "" -#: customize/customize_cmdline.ml:190 -#: common/mlcustomize/customize_cmdline.ml:190 +#: customize/customize_cmdline.ml:198 +#: common/mlcustomize/customize_cmdline.ml:198 msgid "Read customize commands from file" msgstr "" -#: common/mltools/tools_utils.ml:406 +#: common/mltools/tools_utils.ml:421 msgid "Read passphrases from stdin" msgstr "" -#: customize/customize_cmdline.ml:391 -#: common/mlcustomize/customize_cmdline.ml:391 +#: customize/customize_cmdline.ml:411 +#: common/mlcustomize/customize_cmdline.ml:411 msgid "Recursively truncate all files in directory" msgstr "" -#: customize/customize_run.ml:354 +#: customize/customize_run.ml:320 msgid "Recursively truncating: %s" msgstr "" -#: customize/customize_cmdline.ml:355 -#: common/mlcustomize/customize_cmdline.ml:355 +#: customize/customize_cmdline.ml:375 +#: common/mlcustomize/customize_cmdline.ml:375 msgid "Register using subscription-manager" msgstr "" -#: customize/customize_run.ml:320 +#: customize/customize_run.ml:284 msgid "Registering with subscription-manager" msgstr "" -#: customize/customize_cmdline.ml:464 -#: common/mlcustomize/customize_cmdline.ml:464 -msgid "Relabel files with correct SELinux labels" -msgstr "" - #: sysprep/sysprep_operation_ssh_userdir.ml:38 msgid "Remove \".ssh\" directories in the guest" msgstr "" @@ -1485,7 +1525,7 @@ msgstr "" msgid "Remove /etc/passwd- and similar backup files" msgstr "" -#: sysprep/sysprep_operation_ca_certificates.ml:54 +#: sysprep/sysprep_operation_ca_certificates.ml:55 msgid "Remove CA certificates in the guest" msgstr "" @@ -1501,11 +1541,11 @@ msgstr "" msgid "Remove Dovecot (mail server) data" msgstr "" -#: sysprep/sysprep_operation_net_hostname.ml:53 +#: sysprep/sysprep_operation_net_hostname.ml:54 msgid "Remove HOSTNAME and DHCP_HOSTNAME in network interface configuration" msgstr "" -#: sysprep/sysprep_operation_net_hwaddr.ml:51 +#: sysprep/sysprep_operation_net_hwaddr.ml:52 msgid "Remove HWADDR (hard-coded MAC address) configuration" msgstr "" @@ -1513,7 +1553,11 @@ msgstr "" msgid "Remove Kerberos data in the guest" msgstr "" -#: sysprep/sysprep_operation_ipa_client.ml:57 +#: sysprep/sysprep_operation_lvm_system_devices.ml:34 +msgid "Remove LVM2 system.devices file" +msgstr "" + +#: sysprep/sysprep_operation_ipa_client.ml:58 msgid "" "Remove all the files related to an IPA (Identity, Policy, Audit) system.\n" "This effectively unenrolls the guest from an IPA server without interacting\n" @@ -1522,8 +1566,8 @@ msgid "" "This operation does not run C." msgstr "" -#: customize/customize_cmdline.ml:361 -#: common/mlcustomize/customize_cmdline.ml:361 +#: customize/customize_cmdline.ml:381 +#: common/mlcustomize/customize_cmdline.ml:381 msgid "Remove all the subscriptions" msgstr "" @@ -1571,7 +1615,7 @@ msgid "" "users who have a C<.ssh> directory in their home directory." msgstr "" -#: sysprep/sysprep_operation_ipa_client.ml:56 +#: sysprep/sysprep_operation_ipa_client.ml:57 msgid "Remove the IPA files" msgstr "" @@ -1647,7 +1691,7 @@ msgstr "" msgid "Remove the local machine ID" msgstr "" -#: sysprep/sysprep_operation_pacct_log.ml:56 +#: sysprep/sysprep_operation_pacct_log.ml:57 msgid "Remove the process accounting log files" msgstr "" @@ -1682,7 +1726,7 @@ msgstr "" msgid "Remove user at-jobs and cron-jobs" msgstr "" -#: customize/customize_run.ml:333 +#: customize/customize_run.ml:299 msgid "Removing all the subscriptions" msgstr "" @@ -1690,21 +1734,21 @@ msgstr "" msgid "Repo and tag for docker" msgstr "" -#: resize/resize.ml:1443 +#: resize/resize.ml:1499 msgid "" "Resize operation completed with no errors. Before deleting the old disk, " "carefully check that the resized disk boots and works correctly." msgstr "" -#: resize/resize.ml:209 +#: resize/resize.ml:211 msgid "Resize partition" msgstr "" -#: builder/builder.ml:643 +#: builder/builder.ml:668 msgid "Resizing (using virt-resize) to expand the disk to %s" msgstr "" -#: builder/builder.ml:669 +#: builder/builder.ml:695 msgid "Resizing container (but not filesystems) to expand the disk to %s" msgstr "" @@ -1712,27 +1756,27 @@ msgstr "" msgid "Run arbitrary scripts against the guest" msgstr "" -#: customize/customize_cmdline.ml:241 -#: common/mlcustomize/customize_cmdline.ml:241 +#: customize/customize_cmdline.ml:249 +#: common/mlcustomize/customize_cmdline.ml:249 msgid "Run command at first guest boot" msgstr "" -#: customize/customize_cmdline.ml:332 -#: common/mlcustomize/customize_cmdline.ml:332 +#: customize/customize_cmdline.ml:352 +#: common/mlcustomize/customize_cmdline.ml:352 msgid "Run command in disk image" msgstr "" -#: customize/customize_cmdline.ml:235 -#: common/mlcustomize/customize_cmdline.ml:235 +#: customize/customize_cmdline.ml:243 +#: common/mlcustomize/customize_cmdline.ml:243 msgid "Run script at first guest boot" msgstr "" -#: customize/customize_cmdline.ml:326 -#: common/mlcustomize/customize_cmdline.ml:326 +#: customize/customize_cmdline.ml:346 +#: common/mlcustomize/customize_cmdline.ml:346 msgid "Run script in disk image" msgstr "" -#: sysprep/sysprep_operation_script.ml:150 +#: sysprep/sysprep_operation_script.ml:154 msgid "" "Run the named C