Compare commits

..

416 commits

Author SHA1 Message Date
Jerry James
27d75aee6d Fix a changelog entry 2026-01-12 15:56:46 -07:00
Mamoru TASAKA
7adc61bd28 Change irb BR for ruby4.0 2026-01-08 23:14:08 +09:00
Mamoru TASAKA
895518e9b7 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_4.0 2026-01-08 23:04:30 +09:00
Richard W.M. Jones
8c9c012302 New upstream development version 1.58.0
Require libvirt >= 11.10.0, qemu >= 7.2.0 and passt.
2026-01-05 16:19:50 +00:00
Richard W.M. Jones
bba1b606ea Fix double-% in macro 2026-01-05 15:48:16 +00:00
Tom spot Callaway
12272cf017 rebuild for new libconfig 2025-12-17 13:40:57 -05:00
Richard W.M. Jones
3ac14b503c New upstream development version 1.57.7 2025-12-04 17:00:02 +00:00
Richard W.M. Jones
e7046fe55b New upstream development version 1.57.6 2025-11-04 16:23:38 +00:00
Richard W.M. Jones
1084cf6b17 New upstream development version 1.57.5
Test direct backend in %check
2025-10-17 11:07:52 +01:00
Richard W.M. Jones
737237a79e Test the direct backend in %check 2025-10-17 10:11:35 +01:00
Richard W.M. Jones
1edc00676a Require passt
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/YDHKKQSDURTMSKSN6GW3QGQI43DTFXNH/
2025-10-15 12:04:09 +01:00
Remi Collet
90bb4d2baf rebuild for https://fedoraproject.org/wiki/Changes/php85 2025-10-15 08:32:40 +02:00
Richard W.M. Jones
877a247a54 OCaml 5.4.0 rebuild 2025-10-13 19:38:00 +01:00
Richard W.M. Jones
9cb066543f New upstream development version 1.57.4 2025-09-30 10:29:37 +01:00
Richard W.M. Jones
10655b63e0 Enable aarch64 tests
The libvirt bug is now fixed.

Thanks: Cole Robinson
2025-09-30 09:49:57 +01:00
Yaakov Selkowitz
af1ea247c4 Fix bash-completion conditional
ELN (the future RHEL 11) tracks rawhide and therefore also has
bash-completion-devel and the %bash_completions_dir macro.
2025-09-25 01:44:24 +00:00
Python Maint
83dda87efe Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:26:34 +02:00
Richard W.M. Jones
6fa34707b2 New upstream development version 1.57.3 2025-09-09 19:17:48 +01:00
Richard W.M. Jones
82cadaec7f Unify Fedora and RHEL 10.2 spec files 2025-08-29 13:05:06 +01:00
Python Maint
9eeb0986a8 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 12:55:58 +02:00
Richard W.M. Jones
c5c2923895 New upstream development version 1.57.2 2025-08-15 10:58:57 +01:00
Richard W.M. Jones
ad9f3a5f15 New upstream development version 1.57.1 2025-08-13 17:12:57 +01:00
Fedora Release Engineering
e602e8ba97 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-24 19:46:01 +00:00
Jerry James
17b450096e Rebuild to fix OCaml dependencies 2025-07-12 13:13:15 -06:00
Jitka Plesnikova
712bdd9c94 Perl 5.42 rebuild 2025-07-07 16:01:36 +02:00
Richard W.M. Jones
5bc9c98e58 Forgot to upload sources 2025-06-16 16:59:45 +01:00
Richard W.M. Jones
091dfaf12e New upstream stable version 1.56.1
Remove upstream ACPI / seabios fixes included in this version.
2025-06-16 16:58:15 +01:00
Richard W.M. Jones
aa5924b4a3 Further upstream patch for ACPI
https://bugzilla.redhat.com/show_bug.cgi?id=2372329
2025-06-12 08:14:17 +01:00
Richard W.M. Jones
c399a6571d Add upstream patch to fix ACPI 2025-06-11 22:55:44 +01:00
Richard W.M. Jones
6a0f5623dc New upstream stable version 1.56.0
Remove BR xz-devel as it is not needed.
2025-06-11 15:04:21 +01:00
Python Maint
a92e54d898 Rebuilt for Python 3.14 2025-06-06 09:30:51 +02:00
Richard W.M. Jones
de1ecfc738 New upstream development version 1.55.14 2025-06-03 16:35:34 +01:00
Python Maint
0209f60e48 Rebuilt for Python 3.14 2025-06-03 00:20:10 +02:00
Richard W.M. Jones
f00974982e New upstream development version 1.55.13 2025-05-20 14:57:07 +01:00
Richard W.M. Jones
383ca87990 Add temporary workaround for gettext bug:
https://bugzilla.redhat.com/show_bug.cgi?id=2366708
2025-05-19 16:19:17 +01:00
Richard W.M. Jones
698d9ad820 Remove patch that is now upstream 2025-05-19 15:02:45 +01:00
Richard W.M. Jones
1317c346ab New upstream development version 1.55.12 2025-05-19 14:59:53 +01:00
Richard W.M. Jones
0893711f75 Backport upstream patch to really remove zfs-fuse dependency 2025-05-09 15:54:59 +01:00
Richard W.M. Jones
bc325acc76 New upstream development version 1.55.11 2025-05-09 15:46:34 +01:00
Richard W.M. Jones
958e08bd81 Remove libguestfs-zfs subpackage
zfs-fuse has been unmaintained for a very long time.  In fact, the
website has gone.

https://bugzilla.redhat.com/show_bug.cgi?id=2214965
2025-05-07 21:22:28 +01:00
Richard W.M. Jones
797a521575 Remove file-devel BR
This is no longer needed because of:

  commit 2b2be31af09694761c3657d0f7d9299ed722b914
  Author: Richard W.M. Jones <rjones@redhat.com>
  Date:   Tue Apr 22 11:59:25 2025 +0100

    build: Remove test for libmagic

    libmagic (part of the "file" command) was required in earlier versions
    of libguestfs, but this requirement was effectively removed in
    commit b48da89dd6 ("daemon: Reimplement ‘file_architecture’ API in
    OCaml") back in 2017.  Or to be more precise, we now use the "file"
    command inside the daemon, which may or may not use libmagic but we
    no longer link to the library directly.

    Reported-by: Mohamed Akram
    Fixes: commit b48da89dd6edce325f4c1f2956435c4d383ebe77
    Related: https://github.com/libguestfs/libguestfs/issues/184
2025-04-26 13:18:45 +01:00
Richard W.M. Jones
d165325dd3 New upstream development version 1.55.10
Fix macro in comment
2025-04-26 13:16:13 +01:00
Richard W.M. Jones
a1eed9c04c Fix RHEL gating tests
These would always fail because libvirt doesn't start up after being
installed.  You would see errors like:

  libguestfs: opening libvirt handle: URI = qemu:///system, auth = default+wrapper, flags = 0
  libvirt: XML-RPC error : Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory
  libguestfs: error: could not connect to libvirt (URI = qemu:///system): Failed to connect socket to '/var/run/libvirt/virtqemud-sock': No such file or directory [code=38 int1=2]
2025-04-25 17:06:59 +01:00
Richard W.M. Jones
1fc58abcdd New upstream development version 1.55.9
Remove flex and bison
2025-04-16 22:02:34 +01:00
Richard W.M. Jones
566608b2fc Disable tests on aarch64
https://gitlab.com/libvirt/libvirt/-/issues/762
2025-04-04 08:54:20 +01:00
Richard W.M. Jones
04ee36056b New upstream development version 1.55.8
Remove oUnit
2025-04-03 19:28:45 +01:00
Richard W.M. Jones
00b17b7430 New upstream development version 1.55.7 2025-03-11 15:34:53 +00:00
Richard W.M. Jones
67218f97d2 New upstream development version 1.55.6 2025-02-19 17:03:38 +00:00
Richard W.M. Jones
d0aaeeedab New upstream development version 1.55.5 2025-02-18 11:25:09 +00:00
Richard W.M. Jones
b4cbc4fbfc New upstream development version 1.55.4
Contains upstream fix for bin/sbin merge brokenness.
2025-02-05 13:53:24 +00:00
Fedora Release Engineering
655a9a1be9 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-17 11:27:12 +00:00
Zbigniew Jędrzejewski-Szmek
64a8335772 Rebuilt for the bin-sbin merge (2nd attempt)
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2025-01-12 14:33:37 +01:00
Jerry James
b0b5282cc0 OCaml 5.3.0 rebuild for Fedora 42 2025-01-10 14:03:26 -07:00
Richard W.M. Jones
f7d93df6a3 Rebuild for Ruby 3.4 again (RHBZ#2336525) 2025-01-09 11:21:50 +00:00
Richard W.M. Jones
884fa6683d New upstream development version 1.55.3
Baseline version of OCaml moved to 4.08
2025-01-08 17:31:28 +00:00
Mamoru TASAKA
97c01ad3a0 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 2025-01-08 15:16:17 +09:00
Richard W.M. Jones
d08c746e96 Remove squashfs-tools on RHEL
Fixes: https://issues.redhat.com/browse/RHEL-68937
2024-11-26 09:22:49 +00:00
Richard W.M. Jones
ff5b9715aa Make perl Guestfs.so writable
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/DH5N6XV2NJHBIMX226HPDFUMO5NODE2V/
2024-11-18 16:27:25 +00:00
Richard W.M. Jones
969d54fb5a New upstream development version 1.55.2 2024-11-18 14:52:30 +00:00
Richard W.M. Jones
9a92c16bc3 New upstream development version 1.55.1
Replace jansson with json-c
2024-10-22 21:26:20 +01:00
Richard W.M. Jones
edf1795145 Rebuild for Jansson 2.14
(https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/3PYINSQGKQ4BB25NQUI2A2UCGGLAG5ND/)
2024-10-22 16:54:58 +01:00
Richard W.M. Jones
3f27c698db Use stable owner, group and mtime in appliance tarballs (RHBZ#2320025)
Add support for Windows Server 2025
2024-10-21 14:40:45 +01:00
Remi Collet
0e0e918557 rebuild for https://fedoraproject.org/wiki/Changes/php84 2024-10-14 09:16:30 +02:00
Richard W.M. Jones
0b9d476db9 New upstream stable version 1.54.0 2024-10-08 15:01:19 +01:00
Richard W.M. Jones
83f3f8ba76 New upstream development version 1.53.7 2024-10-03 13:22:30 +01:00
Richard W.M. Jones
74d7816935 New upstream development version 1.53.6 2024-08-16 15:32:12 +01:00
Richard W.M. Jones
481bf76bda Fix kernel hang (RHBZ#2303267) 2024-08-16 09:01:00 +01:00
Richard W.M. Jones
8f1a2c16fd Remove syslinux dependencies on RHEL 2024-07-25 12:42:56 +01:00
Fedora Release Engineering
a05db77608 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 14:03:48 +00:00
Zbigniew Jędrzejewski-Szmek
9077713557 Rebuilt for the bin-sbin merge
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2024-07-10 11:16:47 +02:00
Richard W.M. Jones
dff1c1d431 New upstream development version 1.53.5 2024-07-08 16:46:53 +01:00
Richard W.M. Jones
df317de3c7 New upstream development version 1.53.4
Fix broken date in previous changelog entry.
2024-06-28 13:04:45 +01:00
Richard W.M. Jones
dfc275f11d Try to ignore copy-patches.sh in rpminspect
Thanks: Miro Hrončok
2024-06-28 12:13:41 +01:00
Richard W.M. Jones
7feb33cf01 New upstream development version 1.53.3
Remove glusterfs support.
2024-06-27 16:50:34 +01:00
Richard W.M. Jones
ad7b6d94c1 OCaml 5.2.0 ppc64le fix 2024-06-19 16:29:25 +01:00
Jitka Plesnikova
1b88c17833 Perl 5.40 rebuild 2024-06-12 12:49:12 +02:00
Python Maint
2592e5fc60 Rebuilt for Python 3.13 2024-06-10 14:35:30 +02:00
Richard W.M. Jones
608cf467fa Re-enable perl in RHEL, needed for virt-win-reg.
Updates: commit 4bc6624556
Updates: commit 4098de8c52
2024-05-31 21:13:24 +01:00
Richard W.M. Jones
18d0372353 OCaml 5.2.0 for Fedora 41 2024-05-29 22:10:53 +01:00
Richard W.M. Jones
4bc6624556 ./configure --disable-perl and other unused languages in RHEL 10
Fixes: commit 4098de8c52
2024-05-13 16:13:47 +01:00
Richard W.M. Jones
4098de8c52 Remove lua, perl, ruby, php and gobject bindings in RHEL
gobject has always been problematic, and currently it does not work
well with the latest version of GObject.

lua, perl, ruby and php are reckoned to be unused in RHEL and pose
considerable difficulties to maintenance.  Remove them, with a view to
re-adding later if a customer complains.
2024-05-13 15:34:46 +01:00
Richard W.M. Jones
706a26efde Remove gdisk dependency for RHEL
(https://issues.redhat.com/browse/RHEL-35998)
2024-05-13 11:33:03 +01:00
Richard W.M. Jones
aad58ab4ed New upstream development version 1.53.2 2024-05-10 17:35:41 +01:00
Richard W.M. Jones
199875924f New upstream development version 1.53.1 2024-04-25 15:20:01 +01:00
Richard W.M. Jones
de83481787 Unconditionally run autoreconf 2024-04-25 15:17:45 +01:00
Richard W.M. Jones
a8d4e14528 gating: Match any version of RHEL 2024-04-12 11:27:21 +01:00
Richard W.M. Jones
79af29a9b7 BR bash-completion-devel, new in Rawhide 2024-03-25 11:36:49 +00:00
Richard W.M. Jones
ca0111fc5a Use %{bash_completions_dir} macro 2024-03-25 11:19:24 +00:00
Tom Stellard
89084e10d2 Use make macros
https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
2024-01-25 10:32:58 +00:00
Fedora Release Engineering
deb6124adb Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 02:23:59 +00:00
Fedora Release Engineering
266db04dfd Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 04:16:38 +00:00
Richard W.M. Jones
1b8e34eb45 Remove yajl daemon dep and replace with jansson
In libguestfs we removed the need to yajl back in libguestfs 1.40 (Feb
2018).  However this persisted in the spec file until now.  Remove the
yajl dep, but add the dep on jansson (the replacement json library
that we are using now).
2024-01-15 12:24:43 +00:00
Richard W.M. Jones
181f457c59 Use curl instead of wget, since wget2 is broken
(https://gitlab.com/gnuwget/wget2/-/issues/652)
2024-01-15 09:38:37 +00:00
Richard W.M. Jones
3a2a7734bd Make cache directory find more robust
/var/cache/libdnf5 may be missing if dnf5 is not around
2024-01-09 09:30:41 +00:00
Richard W.M. Jones
43a1d7a110 Look for RPMs in /var/cache/libdnf5
https://bugzilla.redhat.com/show_bug.cgi?id=2256945#c5
2024-01-08 21:22:33 +00:00
Richard W.M. Jones
da7b003571 Add link to explanation of why we are building a repo of RPMs 2024-01-08 21:21:57 +00:00
Richard W.M. Jones
345e2a7513 New upstream stable branch version 1.52.0 2024-01-04 18:01:55 +00:00
Mamoru TASAKA
9ee8f6de71 Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 2024-01-04 00:13:11 +09:00
Richard W.M. Jones
eb5bfa36cc New upstream development version 1.51.10 2023-12-19 15:48:26 +00:00
Richard W.M. Jones
e48d79759a OCaml 5.1.1 + s390x code gen fix for Fedora 40 2023-12-18 15:05:57 +00:00
Richard W.M. Jones
e42b2838a8 Fixes for https://github.com/ocaml/ocaml/issues/12820 2023-12-14 09:01:12 +00:00
Richard W.M. Jones
cd66355dd5 OCaml 5.1.1 rebuild for Fedora 40 2023-12-12 14:44:50 +00:00
Richard W.M. Jones
ac1e012eb1 New upstream development version 1.51.9 2023-12-09 11:53:31 +00:00
Richard W.M. Jones
ab2d1d568e Fix build for libxml2 2.12.1 2023-11-27 14:34:15 +00:00
Richard W.M. Jones
0d42c50ccc Fix date in changelog 2023-11-16 14:00:28 +00:00
Richard W.M. Jones
78db150555 New upstream development version 1.51.8 2023-11-16 13:34:00 +00:00
Richard W.M. Jones
57a9beeac9 Don't pull in selinux-policy as a requires 2023-11-14 18:18:19 +00:00
Richard W.M. Jones
7c85e98f6f Merge #8 Don't pull in selinux-policy as a requires 2023-11-08 10:57:53 +00:00
Richard W.M. Jones
15f0fe6b03 Use dhcpcd instead of dhclient (RHBZ#2247057) 2023-10-30 14:32:57 +00:00
Daan De Meyer
ef0dbaea60 Don't pull in selinux-policy as a requires
Building Fedora images without the selinux policy should be
possible. Currently, out of the 500 packages or so installed in
the mkosi-kernel fedora image (https://github.com/DaanDeMeyer/mkosi-kernel),
libguestfs is the only one that has a requires on selinux-policy.
Let's make sure we don't pull in selinux-policy but do keep the version
requirement intact if it is already installed.
2023-10-28 15:25:00 +02:00
Richard W.M. Jones
007cc47bef zstd-devel -> libzstd-devel 2023-10-06 12:10:33 +01:00
Richard W.M. Jones
6414c52e4d Add upstream patch to fix linking the daemon with OCaml 5.1 2023-10-06 12:00:31 +01:00
Richard W.M. Jones
b81ea517da Revert "Update names of the Unix and Camlstr libraries for OCaml 5.1.0"
This reverts commit 67766db26b.

RWMJ: Will be replaced by an upstream patch
2023-10-06 11:34:29 +01:00
Richard W.M. Jones
47191e3da1 OCaml 5.1 rebuild for Fedora 40 2023-10-05 16:04:56 +01:00
Jerry James
67766db26b Update names of the Unix and Camlstr libraries for OCaml 5.1.0
Link with libzstd for OCaml 5.1.0
2023-10-04 23:11:00 -06:00
Remi Collet
25ec33956f rebuild for https://fedoraproject.org/wiki/Changes/php83 2023-10-03 08:27:00 +02:00
Richard W.M. Jones
7f1b9ab599 New upstream development branch 1.51.7 2023-09-21 16:27:39 +01:00
Yaakov Selkowitz
72d1e2e1de Use qemu-kvm in ELN builds
ELN now has a RHEL-like qemu-kvm, and needs to be handled accordingly.
2023-07-25 23:20:13 -04:00
Richard W.M. Jones
f4541eac6e New upstream development branch 1.51.6 2023-07-20 19:39:01 +01:00
Fedora Release Engineering
cd873a392d Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 11:04:02 +00:00
Richard W.M. Jones
509077f1d6 New upstream development branch 1.51.5 2023-07-14 20:51:32 +01:00
Jitka Plesnikova
36ce025ec9 Perl 5.38 re-rebuild updated packages 2023-07-13 11:12:07 +02:00
Richard W.M. Jones
e2d237c476 Bump and rebuild against supermin-5.3.3-13.fc39 2023-07-13 08:31:11 +01:00
Jitka Plesnikova
5370766302 Perl 5.38 re-rebuild updated packages 2023-07-13 08:07:35 +02:00
Richard W.M. Jones
5e7e03448a Fix bytecode platforms
RPM build warnings:
    File not found: /builddir/build/BUILDROOT/libguestfs-1.51.4-5.fc39.ppc64le/usr/lib64/ocaml/guestfs/*.cmxa
    File not found: /builddir/build/BUILDROOT/libguestfs-1.51.4-5.fc39.ppc64le/usr/lib64/ocaml/guestfs/*.cmx
RPM build errors:
    File not found: /builddir/build/BUILDROOT/libguestfs-1.51.4-5.fc39.ppc64le/usr/lib64/ocaml/guestfs/*.cmxa
    File not found: /builddir/build/BUILDROOT/libguestfs-1.51.4-5.fc39.ppc64le/usr/lib64/ocaml/guestfs/*.cmx
2023-07-12 12:20:51 +01:00
Richard W.M. Jones
f3d71cb4e8 OCaml 5.0 rebuild for Fedora 39 2023-07-12 00:17:44 +01:00
Jitka Plesnikova
1ebe4be020 Perl 5.38 rebuild 2023-07-11 15:33:40 +02:00
Richard W.M. Jones
e1d896a8a1 ExcludeArch i686 (https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SPML7CUBSZNI36NLXGVHEG7DNHU3EWOJ/) 2023-07-11 11:36:26 +01:00
Jerry James
dd756afd60 OCaml 5.0.0 rebuild 2023-07-10 22:30:18 -06:00
Python Maint
5fe1618c69 Rebuilt for Python 3.12 2023-06-27 20:14:42 +02:00
Richard W.M. Jones
191ba1199e New upstream development version 1.51.4 2023-06-27 16:21:42 +01:00
Python Maint
3618f7a33c Rebuilt for Python 3.12 2023-06-15 15:34:57 +02:00
Richard W.M. Jones
9f346950b8 Migrated to SPDX license 2023-06-05 14:25:30 +01:00
Richard W.M. Jones
f1cce8400e Rebuild against librpm 10 2023-05-19 13:04:09 +01:00
Richard W.M. Jones
cb2b302101 New upstream development version 1.51.3 2023-04-19 13:50:27 +01:00
Richard W.M. Jones
fd4b4a4b62 New upstream development version 1.51.2 2023-02-21 22:48:22 +00:00
Richard W.M. Jones
5454a28797 New upstream development version 1.51.1
Remove virt-dib
2023-02-10 11:12:48 +00:00
Richard W.M. Jones
19312656d8 Remove libguestfs-dib
Removed upstream in libguestfs >= 1.51.1
2023-02-07 13:31:39 +00:00
Richard W.M. Jones
c3704e0200 New upstream stable branch 1.50.0 2023-02-07 12:08:37 +00:00
Richard W.M. Jones
f8b1780c7d Rebuild OCaml packages for F38 2023-01-24 18:08:01 +00:00
Richard W.M. Jones
06dd88ce06 New upstream development version 1.49.9
+BR ocaml-augeas-devel
2023-01-20 08:33:06 +00:00
Fedora Release Engineering
68f61c4dfc Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 16:31:02 +00:00
Jitka Plesnikova
6140dbc2f0 Remove perl(MODULE_COMPAT), it will be replaced by generators 2023-01-13 09:44:02 +01:00
Mamoru TASAKA
a64cbbf92a Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 2023-01-04 14:08:53 +09:00
Richard W.M. Jones
8f14a2c354 New upstream development version 1.49.8 2022-12-10 12:36:51 +00:00
Richard W.M. Jones
8f8c5740d5 New upstream development version 1.49.7 2022-11-28 12:14:17 +00:00
Richard W.M. Jones
1dfae674ee New upstream development version 1.49.6 2022-11-21 17:14:41 +00:00
Richard W.M. Jones
ea7571f662 Move libguestfs-make-fixed-appliance to main package (RHBZ#2140695) 2022-11-08 13:07:09 +00:00
Richard W.M. Jones
75f10447a6 Add workaround for openssl bug RHBZ#2133884 2022-10-11 22:03:47 +01:00
Richard W.M. Jones
079cc475fb New upstream development version 1.49.5 2022-10-11 16:47:29 +01:00
Remi Collet
c913345514 rebuild for https://fedoraproject.org/wiki/Changes/php82 2022-10-05 09:44:04 +02:00
Richard W.M. Jones
1d510c3e2c Add BR zstd
Will be required by libguestfs >= 1.49.5.
2022-08-10 08:47:20 +01:00
Richard W.M. Jones
3c86bbd78e New upstream development version 1.49.4 2022-08-01 15:23:14 +01:00
Richard W.M. Jones
0e746eddb8 Skip tests on debug kernels
These Rawhide kernels have become so slow that they are no longer able
to run libguestfs in Koji.
2022-07-21 21:30:34 +01:00
Fedora Release Engineering
c0052f0c34 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 18:00:04 +00:00
Richard W.M. Jones
f1b5b138be ocaml-gettext/-devel is no longer required 2022-07-20 10:58:00 +01:00
Richard W.M. Jones
9613879357 Add clevis-luks to BRs, required by 1.49.3 2022-07-04 11:05:47 +01:00
Richard W.M. Jones
d15a8071b1 New upstream development version 1.49.3 2022-07-01 16:00:40 +01:00
Python Maint
4ab8c7248f Rebuilt for Python 3.11 2022-06-20 10:45:38 +02:00
Richard W.M. Jones
1783711e2f OCaml 4.14.0 rebuild 2022-06-19 11:51:54 +01:00
Richard W.M. Jones
ce0a8a8976 Enable PHP bindings (on RHEL)
https://bugzilla.redhat.com/show_bug.cgi?id=2097718
2022-06-17 08:43:22 +01:00
Python Maint
e598e60d7c Rebuilt for Python 3.11 2022-06-16 13:34:40 +02:00
Richard W.M. Jones
75e77be87a Fix PHP bindings 2022-06-16 08:44:35 +01:00
Python Maint
8a7ee9b294 Rebuilt for Python 3.11 2022-06-15 18:25:34 +02:00
Jitka Plesnikova
7f0f202975 Perl 5.36 rebuild 2022-06-01 08:52:05 +02:00
Richard W.M. Jones
7c2b529975 New upstream development version 1.49.2 2022-05-26 12:38:37 +01:00
Richard W.M. Jones
4c4ca3eda2 Add upstream patch which helps debugging appliance generation. 2022-05-21 11:13:29 +01:00
Richard W.M. Jones
3336b47a09 New upstream development version 1.49.1 2022-05-12 15:29:28 +01:00
Richard W.M. Jones
461e5bef9c virt-rescue: Add versioned requires on libguestfs base package
Otherwise this can be satisfied by any libguestfs, even quite an old
version.
2022-04-20 13:41:55 +01:00
Richard W.M. Jones
51cdb68f09 New upstream stable branch version 1.48.1 2022-04-14 17:04:34 +01:00
Richard W.M. Jones
d2bb9986b2 New upstream stable branch version 1.48.0
Remove the RHEL (downstream) patches as they are out of date.
2022-03-14 14:12:24 +00:00
Richard W.M. Jones
5106bb9547 New upstream development version 1.47.4
Replace guestfs-release-notes-historical(1) with guestfs-release-notes(1)
2022-03-08 14:30:27 +00:00
Richard W.M. Jones
97290932ce New upstream development version 1.47.3
Enable tests on all arches again.
2022-03-01 11:40:25 +00:00
Richard W.M. Jones
419bada284 Add more external programs used by the library
https://bugzilla.redhat.com/show_bug.cgi?id=1989514#c19

Thanks: Alice Frose, Andrea Bolognani
2022-02-28 19:16:16 +00:00
Richard W.M. Jones
65d9d766a2 Bump and rebuild for eln 2022-02-08 21:18:40 +00:00
Richard W.M. Jones
ed16a793e0 OCaml 4.13.1 rebuild to remove package notes 2022-02-04 16:49:40 +00:00
Fedora Release Engineering
b5435eeae3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 16:23:11 +00:00
Richard W.M. Jones
37b78c5d2f Build and rebuild for new glibc causing broken deps on armv7 (RHBZ#2034715) 2022-01-04 19:41:21 +00:00
Richard W.M. Jones
c6fc8008f3 New upstream development version 1.47.2 2021-12-24 10:12:32 +00:00
Richard W.M. Jones
5f98d3ef87 New upstream development version 1.47.1 2021-12-09 19:24:20 +00:00
Richard W.M. Jones
04309c70cd Require libvirt-daemon-driver-storage-core
resolves: rhbz#2018358
2021-10-29 09:47:45 +01:00
Remi Collet
489fcddcb7 rebuild for https://fedoraproject.org/wiki/Changes/php81 2021-10-28 15:08:34 +02:00
Richard W.M. Jones
6f05a2f91c OCaml 4.13.1 build 2021-10-05 11:02:06 +01:00
Richard W.M. Jones
9386c1d522 Disable tests on armv7
virtio devices cannot be found by the guest.  It could be similar to
https://bugzilla.redhat.com/show_bug.cgi?id=2006709 which was reported
against ppc64le.
2021-09-23 19:38:09 +01:00
Richard W.M. Jones
1a2b1681de Remove BUGS file, no longer provided upstream 2021-09-23 16:09:29 +01:00
Richard W.M. Jones
05680b55f6 New upstream stable branch version 1.46.0 2021-09-23 15:55:13 +01:00
Richard W.M. Jones
e2c24718cf Rebuild for updated ntfs-3g CVE (RHBZ#1999788) 2021-08-31 23:21:04 +01:00
Richard W.M. Jones
db62beac35 Remove Patch line left by accident in previous commit. 2021-08-31 17:17:23 +01:00
Richard W.M. Jones
58d553dcbd New upstream development version 1.45.7.
Fix to work with qemu 6.1 (RHBZ#1998820)
2021-08-31 17:11:36 +01:00
Richard W.M. Jones
6c323aeaf2 Upstream patch to work with qemu 6.1 (RHBZ#1998820) 2021-08-31 08:38:26 +01:00
Richard W.M. Jones
941da64078 Move supermin appliance to a subpackage
https://bugzilla.redhat.com/show_bug.cgi?id=1989514

Move the appliance to a subpackage (libguestfs-appliance).  The main
package depends on this new subpackage so in effect nothing changes
for most users.

However this allows the appliance to be replaced if there exists a
package called "libguestfs-noappliance".  This package is not provided
anywhere, you have to provide the dependency or make the package
yourself.  But if you do this then libguestfs won't install the
appliance and you are free to replace it with (eg) a fixed appliance.
2021-08-06 09:51:19 +01:00
Richard W.M. Jones
4c961db464 Fix license files
Use %license and include COPYING.LIB.
2021-08-06 08:44:25 +01:00
Fedora Release Engineering
34629afce6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-22 11:32:32 +00:00
Richard W.M. Jones
689bd7669a RHEL 9 patch for openssl missing configuration file
https://bugzilla.redhat.com/show_bug.cgi?id=1977214#c13
2021-06-29 15:47:39 +01:00
Richard W.M. Jones
2be2382c8f Remove Suggests for unsupported qemu drivers in RHEL (RHBZ#1975703) 2021-06-24 09:59:30 +01:00
Richard W.M. Jones
8df9b2daac Depend on hivex-libs instead of hivex. 2021-06-12 07:43:58 +01:00
Python Maint
bc142755f6 Rebuilt for Python 3.10 2021-06-04 20:09:20 +02:00
Richard W.M. Jones
0b4e08f0b4 Add --enable-appliance-format-auto (RHBZ#1967166) 2021-06-03 14:30:35 +01:00
Richard W.M. Jones
c8896d32cb Remove bogus timestamp added by rpmdev-bumpspec 2021-06-02 10:36:08 +01:00
Richard W.M. Jones
af41447287 Add gating tests (for RHEL 9) 2021-06-02 10:34:23 +01:00
Richard W.M. Jones
6b72a37644 Depend on rpm-libs >= 4.16.1.3 (RHBZ#1966541). 2021-06-01 14:44:43 +01:00
Richard W.M. Jones
85d3203b3a Fix date in changelog 2021-05-27 18:27:12 +01:00
Richard W.M. Jones
f1ab20704e New upstream development version 1.45.6. 2021-05-27 17:45:59 +01:00
Jitka Plesnikova
baa2e3c243 Perl 5.34 rebuild 2021-05-21 22:28:59 +02:00
Jeff Law
1ead53a482 Re-enable LTO 2021-05-10 16:27:17 -06:00
Richard W.M. Jones
d4725ab61b No qemu-kvm on POWER on RHEL
resolves: rhbz#1946532

(cherry picked from commit 575d24d6694f4460295af0be50ef49c7d0432884)
2021-04-20 11:16:37 +01:00
Richard W.M. Jones
063aa237e0 libguestfs from 1.45.5 no longer bundles gnulib. 2021-04-14 12:44:06 +01:00
Richard W.M. Jones
8f17229bff New upstream development version 1.45.5. 2021-04-09 12:55:59 +01:00
Richard W.M. Jones
6ab119c488 New upstream version 1.45.4. 2021-04-03 12:37:39 +01:00
Richard W.M. Jones
a6a11a65c9 Add workaround for broken "file" utility in Rawhide (RHBZ#1945122). 2021-03-31 13:46:53 +01:00
Richard W.M. Jones
8f6ba6d789 Fix date in changelog. 2021-03-31 12:06:35 +01:00
Richard W.M. Jones
f331cc95d3 Don't require genisoimage or xorriso for the appliance. 2021-03-31 11:53:45 +01:00
Richard W.M. Jones
928729ea6e Switch from genisoimage to xorriso. 2021-03-30 15:35:23 +01:00
Richard W.M. Jones
9da4883de4 Add downstream (RHEL-only) patches (RHBZ#1931724). 2021-03-30 12:05:09 +01:00
Richard W.M. Jones
b091b5dde2 BR rpm-devel to get header files. 2021-03-29 21:36:56 +01:00
Richard W.M. Jones
cc9dde2cb7 Add proper dependencies on librpm, remove BDB. 2021-03-29 21:35:44 +01:00
Richard W.M. Jones
8c3b34551e New upstream release 1.45.3. 2021-03-29 19:49:25 +01:00
Richard W.M. Jones
3c91923901 Remove no longer needed requires on libguestfs-tools-c. 2021-03-26 09:56:05 +00:00
Richard W.M. Jones
16a560c22f New upstream version 1.45.2.
- This drops the tools.  Now packaged as guestfs-tools.
- guestfish, guestmount, guestunmount now packaged with libguestfs.
- virt-rescue now packaged in libguestfs-rescue.
- Drop ChangeLog file.
- Remove virt-dib in RHEL 9.
- Depend on PCRE2 instead of PCRE.
2021-03-23 12:00:10 +00:00
Richard W.M. Jones
4a269d5cf9 Make ocaml-ounit dependency conditional on !RHEL.
It's only needed by virt-builder to run some minor tests.
2021-03-18 13:06:32 +00:00
Richard W.M. Jones
175743174b Fix -cpu max and require libvirt >= 7.1.0. 2021-03-18 12:49:49 +00:00
Richard W.M. Jones
e38829eec1 Drop dependency on perl(Sys::Virt). 2021-03-18 12:26:27 +00:00
Richard W.M. Jones
4fa48327db Drop Requires: libvirt-daemon-kvm, pulls in the whole of qemu and subpkgs.
Cole Robinson writes:

> libguestfs spec looks like it has a bug (looking at fedora rawhide). It
> attempts to use Suggests/Recommends to limit what's pulled in of qemu
> modules, but then it has a dep on libvirt-daemon-kvm which conditionally
> pulls in qemu-kvm, which on fedora pulls in every qemu module. That
> explains SDL and gtk deps.
>
> libvirt-daemon-kvm is just a metapackage with deps on
> libvirt-daemon-driver-X subsystems, and qemu-kvm. The thing that
> actually puts the libvirt qemu driver on the host is
> libvirt-daemon-driver-qemu, which libguestfs already has an explicit dep on.
>
> So try dropping the libvirt-daemon-kvm dep and see if things break.
2021-03-10 18:00:19 +00:00
Richard W.M. Jones
97b5f69cda Bump and rebuild for ocaml-gettext update. 2021-03-08 12:21:56 +00:00
Remi Collet
d494fdb90a add trivial patch to fix build with PHP 8 2021-03-05 13:40:44 +01:00
Remi Collet
070ac54283 rebuild for https://fedoraproject.org/wiki/Changes/php80 2021-03-05 10:54:07 +01:00
Richard W.M. Jones
d8408afe21 New upstream version 1.45.1. 2021-03-03 12:48:05 +00:00
Richard W.M. Jones
7e7de18823 Fixes for OCaml 4.12. 2021-03-02 10:47:49 +00:00
Richard W.M. Jones
0c9b3562af OCaml 4.12.0 build 2021-03-02 10:06:31 +00:00
Richard W.M. Jones
cbf97ecfad Remove jfsutils (dead upstream since 2011).
Remove nilfs (dead upstream since 2015).
Remove reiserfs (dead upstream since 2006).
2021-02-17 18:21:37 +00:00
Richard W.M. Jones
49700015ed Remove gfs2-utils dependency in RHEL 9. 2021-02-09 10:24:03 +00:00
Richard W.M. Jones
1a5193c66e Add upstream patch to use -cpu max. 2021-01-28 13:35:20 +00:00
Richard W.M. Jones
2f9953e2d1 Re-enable the tests on Fedora. 2021-01-28 11:53:40 +00:00
Richard W.M. Jones
4caba8df2f ELN has full-fat qemu (not qemu-kvm). 2021-01-28 11:52:11 +00:00
Fedora Release Engineering
1aa43ac92e - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 17:13:17 +00:00
Mamoru TASAKA
30d986c2bc F-34: rebuild against ruby 3.0 2021-01-07 10:54:20 +09:00
Richard W.M. Jones
3b8eaf5cc4 New upstream stable version 1.44.0. 2021-01-06 10:23:00 +00:00
Richard W.M. Jones
9cc996f109 New upstream version 1.43.4. 2021-01-05 15:04:44 +00:00
Richard W.M. Jones
374f82f47f Drop explicit deps on perl(Sys::Virt) and perl(Win::Hivex).
Sys::Virt will be dropped in RHEL.  The question was why we have this
dependency, since the tools don't actually use Sys::Virt at all.
Therefore I dropped it from Fedora too.

perl(Win::Hivex) should be picked up by the automatic dep scripts.
2021-01-04 11:59:06 +00:00
Richard W.M. Jones
cfa88f9c57 Unify Fedora and RHEL spec files. 2020-12-02 18:18:40 +00:00
Richard W.M. Jones
99c563d97c Miscellanous cleanups.
- Remove obsolete "bump-and-build.sh" script.

- Bring the README replacement file up to date.

- Add copy-patches script from RHEL.
2020-12-02 12:57:18 +00:00
Richard W.M. Jones
a211636966 Disable LTO because of memory running out on ARMv7.
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y3WTAS3MJ5WNNVVYPXARFXV6A6QH6KEY/
2020-12-01 19:07:41 +00:00
Richard W.M. Jones
a759a6527c New upstream version 1.43.3. 2020-12-01 17:20:11 +00:00
Thierry Vignaud
1ece913403 simplify using sed -i 2020-11-11 21:48:26 +00:00
Richard W.M. Jones
7dba19275f New upstream version 1.43.2. 2020-09-21 20:41:35 +01:00
Richard W.M. Jones
c0f168d644 Replace libvirt-daemon-qemu with libvirt-daemon-kvm.
The nomenclature is a bit confusing, but libvirt-daemon-kvm will pull
in the KVM & TCG emulator for the same architecure which is what we need.

libvirt-daemon-qemu pulls in the other-arch TCG emulators which we
never need for libguestfs.

The same change is already made in RHEL 7 and RHEL 8.
2020-09-21 17:31:29 +01:00
Richard W.M. Jones
8e5955c8cd OCaml 4.11.1 rebuild 2020-09-01 21:50:48 +01:00
Richard W.M. Jones
b0858dfd8d OCaml 4.11.0 rebuild 2020-08-21 19:33:27 +01:00
Merlin Mathesius
b40248ac63 Use ExclusiveArch: %{kernel_arches}
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2020-08-10 14:17:08 -05:00
Richard W.M. Jones
84c3a4792e Revert "Disable LTO."
This reverts commit 60355566b1.
2020-07-31 18:50:58 +01:00
Richard W.M. Jones
60355566b1 Disable LTO.
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/ULGH5JYL7MHKDKTINJLOEN2QG6LOHWH7/
2020-07-31 11:53:57 +01:00
Fedora Release Engineering
c519d3e43e - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-28 04:48:22 +00:00
Thierry Vignaud
17b1123681 fix macro expansion in comment 2020-07-20 12:14:46 +01:00
Richard W.M. Jones
813ffc39ae New development branch 1.43.
Remove upstream patches.
2020-07-06 16:31:14 +01:00
Jitka Plesnikova
f38735b278 Perl 5.32 rebuild 2020-06-25 15:06:50 +02:00
Miro Hrončok
21dc46bc2f Rebuilt for Python 3.9 2020-05-26 02:50:38 +02:00
Richard W.M. Jones
aa4afaf185 Fix path to libguestfs appliance. 2020-05-06 12:42:17 +01:00
Richard W.M. Jones
2909764dcc Try enabling autotools cruft instead. 2020-05-05 20:27:23 +01:00
Richard W.M. Jones
bde6f7fba6 +BR git.
Unclear why this is needed.
2020-05-05 20:18:06 +01:00
Richard W.M. Jones
b509da932d OCaml 4.11.0+dev2-2020-04-22 rebuild 2020-05-05 19:42:50 +01:00
Richard W.M. Jones
7b18e47f5e OCaml 4.11.0 pre-release attempt 2 2020-04-22 19:51:27 +01:00
Richard W.M. Jones
e37dfc33c2 Update all OCaml dependencies for RPM 4.16. 2020-04-04 13:54:48 +01:00
Richard W.M. Jones
fabfd2fbe9 Enable NTFS-3g system compression. 2020-03-12 12:20:12 +00:00
Richard W.M. Jones
dd205f300a New upstream stable version 1.42.0.
- Drop the benchmarking subpackage: moved to a new package upstream.
- Enable Vala bindings.
2020-03-09 17:58:14 +00:00
Richard W.M. Jones
42818e7e23 OCaml 4.10.0 final. 2020-02-27 09:16:37 +00:00
Fedora Release Engineering
b43882fe67 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 09:19:45 +00:00
Vít Ondruch
cbdfa80fe9 Another rebuild against Ruby 2.7.
This time due to "failed" build caused by Koji overload.
2020-01-20 18:31:58 +01:00
Vít Ondruch
d33d482cf7 Another rebuild against Ruby 2.7. 2020-01-20 15:57:38 +01:00
Richard W.M. Jones
91d83514c4 OCaml 4.10.0+beta1 rebuild. 2020-01-19 16:55:02 +00:00
Mamoru TASAKA
c822e8c6ce F-32: rebuild against ruby27 2020-01-18 13:59:14 +09:00
Richard W.M. Jones
b8ac2c8b68 Don't depend on libvirt-daemon-kvm monolith.
libguestfs usually needs qemu.  However it only requires an emulator
for the same architecture, not for all architectures.
libvirt-daemon-kvm pulls in qemu which pulls in emulators for all
architectures, as well as a bunch of other stuff we don't need at all
like network interface support and nwfilter.

There are no Fedora TCG-only arches, so drop the conditional section.
2020-01-10 22:16:21 +00:00
Richard W.M. Jones
47cd88a1cc OCaml 4.09.0 (final) rebuild. 2019-12-06 15:20:14 +00:00
Richard W.M. Jones
24fa0807a5 Use gpgverify macro instead of explicit gpgv2 command. 2019-11-27 11:05:25 +00:00
Richard W.M. Jones
6ee5b15245 New upstream version 1.41.8.
virt-v2v is now in a separate project.
Drop erlang bindings.
2019-11-19 18:09:49 +00:00
Richard W.M. Jones
85c51621ab New upstream version 1.41.8.
virt-v2v is now in a separate project.
2019-11-19 17:05:09 +00:00
Richard W.M. Jones
ed63a04553 No need to remove virt-p2v bash completion files now. 2019-10-11 16:31:54 +01:00
Richard W.M. Jones
959f22e6d8 New upstream version 1.41.5. 2019-10-11 11:58:13 +01:00
Remi Collet
5c1ab310eb rebuild for https://fedoraproject.org/wiki/Changes/php74 2019-10-04 06:53:05 +02:00
Pino Toscano
2b9f5a19f6 Drop virt-p2v
It is now packaged as own source.
2019-09-17 18:56:55 +02:00
Richard W.M. Jones
48bb17705f New upstream version 1.41.4. 2019-09-02 22:44:02 +01:00
Miro Hrončok
128db1e9aa Rebuilt for Python 3.8 2019-08-19 10:17:55 +02:00
Richard W.M. Jones
8e247b706c OCaml 4.08.1 (final) rebuild. 2019-08-16 17:26:18 +01:00
Richard W.M. Jones
d8b20c846c OCaml 4.08.1 (rc2) rebuild. 2019-08-01 08:30:01 +01:00
Richard W.M. Jones
22b8a21feb Disable the package entirely on i686 because there is no kernel
https://fedoraproject.org/wiki/Changes/Stop_Building_i686_Kernels
2019-07-26 11:51:04 +01:00
Fedora Release Engineering
450c22c188 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 13:26:25 +00:00
Jitka Plesnikova
35680038b9 Perl 5.30 rebuild 2019-05-31 19:39:26 +02:00
Richard W.M. Jones
e9087981ae Add proposed patch for Python 3.8 (RHBZ#1705482). 2019-05-31 13:19:19 +01:00
Richard W.M. Jones
29e15986f0 Add patches_touch_autotools mechanism from nbdkit. 2019-05-31 13:19:19 +01:00
Richard W.M. Jones
5156cc7e12 Remove Java bindings.
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/CW4XMOIKMNRRPAZ4H2ER7VPBY6YV2ODL/#YHTZ7IGVTKPWCBOY5C6UW7BMX7F35R5Q
2019-03-18 22:17:06 +00:00
Richard W.M. Jones
01e2244a84 Remove Python 2 bindings completely.
https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
2019-03-07 09:56:42 +00:00
Igor Gnatenko
2a5c0ae43b Rebuild for readline 8.0 2019-02-17 09:30:52 +01:00
Richard W.M. Jones
13c5e911e4 New upstream version 1.40.2. 2019-02-08 15:18:22 +00:00
Fedora Release Engineering
60f7297fe5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 07:18:06 +00:00
Mamoru TASAKA
4a2fec1fb1 F-30: rebuild against ruby26 2019-01-22 13:33:39 +09:00
David Abdurachmanov
ca6d3c66e5 Disable ZFS for RISC-V (riscv64)
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2019-01-21 18:01:07 +00:00
Richard W.M. Jones
f17a33dea6 nbdkit Python3 plugin is called "python3" in Fedora, adjust configure line. 2019-01-17 19:30:33 +00:00
Richard W.M. Jones
955f13fda6 - Add new virt-v2v man pages. 2019-01-17 15:41:15 +00:00
Richard W.M. Jones
6f261cafba New upstream version 1.40.1.
Remove patch which is now upstream.
2019-01-17 15:22:28 +00:00
Richard W.M. Jones
90a710c93d New upstream version 1.40.1. 2019-01-17 15:10:45 +00:00
Björn Esser
19a21be689
Rebuilt for libcrypt.so.2 (#1666033) 2019-01-14 19:06:59 +01:00
Richard W.M. Jones
3f9aa057a9 Forgot to update Release in previous commit. 2019-01-08 13:42:13 +00:00
Richard W.M. Jones
2404f718a0 Small fix for qemu behaviour (RHBZ#1664318). 2019-01-08 13:40:44 +00:00
Richard W.M. Jones
6ae06d4e94 Merge #4 Fix test syntax 2018-12-18 08:42:50 +00:00
Richard W.M. Jones
3c0504323e lib: Add Recommends for libvirt-daemon-config-network so that networking
works out of the box.
2018-10-12 13:59:42 +01:00
Petr Šplíchal
19ec0fbda7 Fix syntax to correctly run libguestfs-test-tool 2018-10-09 15:48:40 +02:00
Richard W.M. Jones
033157bb4e tests: Add a CI test, running libguestfs-test-tool.
This is experimental.  Unfortunately the only way to test if these
tests actually work is for them to be committed and pushed to
dist-git.
2018-09-27 16:32:23 +01:00
Richard W.M. Jones
82f97b22c2 New upstream version 1.39.11. 2018-09-22 13:18:09 +01:00
Richard W.M. Jones
b0b57c62cc New upstream version 1.39.10. 2018-09-21 15:06:35 +01:00
Richard W.M. Jones
c7c4488f6a New upstream version 1.39.9. 2018-08-31 16:51:12 +01:00
Richard W.M. Jones
a1ee2d74f3 Disable tests on ppc64 because of
https://bugzilla.redhat.com/show_bug.cgi?id=1614948

(cherry picked from commit 6b4e334588)
2018-08-10 22:22:28 +01:00
Richard W.M. Jones
11ab21d8a6 New upstream version 1.39.8. 2018-07-27 15:43:58 +01:00
Richard W.M. Jones
bcb8b1c0b4 v2v: Recommends nbdkit-plugin-vddk for -it vddk mode. 2018-07-26 09:14:50 +01:00
Richard W.M. Jones
d7c0a1924e Rebuild for unannounced soname bump in libconfig. 2018-07-24 16:11:10 +01:00
Richard W.M. Jones
b92cecbe15 v2v/TODO was removed upstream. 2018-07-14 17:15:52 +01:00
Richard W.M. Jones
bd1cb7ffa5 New upstream version 1.39.7. 2018-07-14 15:05:19 +01:00
Richard W.M. Jones
1ec687372d v2v: Recommends nbdkit and the Python 3 plugin. 2018-07-13 13:30:51 +01:00
Fedora Release Engineering
60b4ea1cc1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 08:13:01 +00:00
Richard W.M. Jones
4cd4ff292b OCaml 4.07.0 (final) rebuild. 2018-07-11 17:11:25 +01:00
Richard W.M. Jones
ddebce8014 Revert "Enable libguestfs-benchmarking subpackage on all architectures."
This reverts commit c317bc4a01.
2018-07-11 16:46:55 +01:00
Richard W.M. Jones
c317bc4a01 Enable libguestfs-benchmarking subpackage on all architectures. 2018-07-11 15:45:11 +01:00
Richard W.M. Jones
c1eec06fc3 Update PHP dependencies. 2018-07-10 09:53:28 +01:00
Richard W.M. Jones
00ee4d8211 BR on python-unversioned-command
https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package
2018-07-05 16:33:25 +01:00
Richard W.M. Jones
2c9d3e4854 Remove ldconfig
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/SU3LJVDZ7LUSJGZR5MS72BMRAFP3PQQL/
2018-07-05 16:08:02 +01:00
Petr Písař
e311dbaaf6 Perl 5.28 rebuild 2018-07-03 12:15:32 +02:00
Miro Hrončok
b870831bd1 Rebuilt for Python 3.7 2018-07-02 18:22:41 +02:00
Jitka Plesnikova
95e46234b5 Perl 5.28 rebuild 2018-06-29 22:55:30 +02:00
Richard W.M. Jones
ba9ed0975e Add new bash-completion script for libguestfs-test-tool. 2018-06-29 19:27:24 +01:00
Richard W.M. Jones
f129ad178f New upstream version 1.39.6. 2018-06-29 18:44:15 +01:00
Richard W.M. Jones
a120fa3b9e Bump release and rebuild. 2018-06-20 16:51:47 +01:00
Richard W.M. Jones
0f49172c3c Bump release and rebuild. 2018-06-20 13:49:17 +01:00
Richard W.M. Jones
8dbfe7ab9e OCaml 4.07.0-rc1 rebuild. 2018-06-20 11:28:30 +01:00
Miro Hrončok
c6cf73a4e4 Rebuilt for Python 3.7 2018-06-19 10:46:08 +02:00
Richard W.M. Jones
18c433882a New upstream version 1.39.5. 2018-05-23 11:32:11 +01:00
Pino Toscano
04a92597b7 demote osinfo-db as libguestfs-tools-c suggest
it is not used anymore by the library, but only by one of the tools in
libguestfs-tools-c -- hence, demote it to suggest
2018-05-17 17:04:43 +01:00
Richard W.M. Jones
4cbc2d5ccb New upstream version 1.39.4. 2018-05-02 11:42:25 +01:00
Richard W.M. Jones
7bf2744f0e Disable tests on ppc64. 2018-04-22 19:56:46 +01:00
Richard W.M. Jones
1da42b70a5 Remove upstream patch. 2018-04-22 16:17:14 +01:00
Richard W.M. Jones
b57feae1af New upstream version 1.39.3. 2018-04-22 15:10:01 +01:00
Richard W.M. Jones
8a46035427 Don't call move_to for zfs on architectures which don't have zfs. 2018-04-19 11:16:09 +01:00
Richard W.M. Jones
0fc7c3e4db Harden move_to script.
If the package name is not found in the packages file (perhaps because
the package was resolved to a different name through Obsoletes etc)
then the move_to script could create two dependencies.  Detect this
and hard-fail.

See also:
https://bugzilla.redhat.com/show_bug.cgi?id=1568676
2018-04-19 10:16:45 +01:00
Iryna Shcherbina
c251db3ac8 Update Python 2 dependency declarations to new packaging standards 2018-04-10 18:11:41 +02:00
Richard W.M. Jones
f034e58d54 Add patch to fix detection of qemu mandatory locking. 2018-03-29 20:22:28 +01:00
Richard W.M. Jones
02bf5b3c16 New upstream version 1.39.2. 2018-03-29 15:55:56 +01:00
Richard W.M. Jones
fcdb74bc43 dnf: Don't try to read real /etc/dnf/modules.d which is unreadable by non-root. 2018-03-13 18:39:52 +00:00
Richard W.M. Jones
e67c8965a4 For 1.39: yajl -> jansson 2018-03-13 14:14:33 +00:00
Richard W.M. Jones
4d1f692eeb Disable tarball signing for the development branch. 2018-03-13 14:05:06 +00:00
Richard W.M. Jones
7e3a9dd192 New upstream version 1.39.1. 2018-03-13 13:56:24 +00:00
Richard W.M. Jones
fb05053661 Add gcc-c++ dependency. 2018-02-18 18:39:44 +00:00
Richard W.M. Jones
605bf58332 Enable tarball signing since we are on a stable branch.
Fix Source URLs.
2018-02-09 16:22:15 +00:00
Richard W.M. Jones
f8c98eab62 New upstream version 1.38.0. 2018-02-09 16:05:42 +00:00
Richard W.M. Jones
6657479671 New upstream version 1.37.37. 2018-02-06 21:55:06 +00:00
Richard W.M. Jones
75bec837bb New upstream version 1.37.36.
Unbreak the linker.
2018-01-26 08:34:15 +00:00
Richard W.M. Jones
90a1a50306 New upstream version 1.37.36. 2018-01-25 23:00:37 +00:00
Björn Esser
c495bb10bf
Rebuilt for switch to libxcrypt 2018-01-20 23:07:05 +01:00
Richard W.M. Jones
fde194480e Add BR libtirpc-devel 2018-01-11 08:33:17 +00:00
Richard W.M. Jones
a088a41fff Add BR rpcgen and rebuild against updated Ruby. 2018-01-11 08:22:53 +00:00
Richard W.M. Jones
ca07dae173 Add virt-builder-repository and man page. 2017-12-10 13:07:44 +00:00
Richard W.M. Jones
a2e437013a - Remove upstream patches. 2017-12-10 12:22:20 +00:00
Richard W.M. Jones
c12622ca03 New upstream version 1.37.35. 2017-12-10 11:43:48 +00:00
Richard W.M. Jones
802f1260a8 Remove <shareable/> for libvirt >= 3.10. 2017-12-07 09:07:28 +00:00
Richard W.M. Jones
b3901f5d4a Fix locking on NBD drives. 2017-12-03 19:28:36 +00:00
Richard W.M. Jones
250df0e22f OCaml 4.06.0 rebuild. 2017-11-17 14:09:25 +00:00
Richard W.M. Jones
98a22571d6 New upstream version 1.37.34. 2017-11-17 14:04:53 +00:00
Richard W.M. Jones
9362d4e48c New upstream version 1.37.31. 2017-10-19 09:16:32 +01:00
Richard W.M. Jones
78f43cd786 New upstream version 1.37.29. 2017-10-10 09:08:56 +01:00
Richard W.M. Jones
5a408f5bb6 Add libguestfs-ufs (BSD) subpackage. 2017-10-05 16:25:37 +01:00
Richard W.M. Jones
d5790479a7 New upstream version 1.37.28. 2017-09-28 20:40:39 +01:00
Richard W.M. Jones
c483e7c7c1 Remove glibc BR referencing Fedora 25. 2017-09-25 12:30:39 +01:00
Richard W.M. Jones
48421ed08e Remove grubby dependency, no longer needed with newest supermin. 2017-09-25 12:30:39 +01:00
Richard W.M. Jones
5829977618 New upstream version 1.37.27. 2017-09-23 10:42:51 +01:00
Richard W.M. Jones
2624e9cee2 New upstream version 1.37.26. 2017-09-17 12:42:52 +01:00
Richard W.M. Jones
252b7e902e New upstream version 1.37.25. 2017-09-16 09:35:32 +01:00
Richard W.M. Jones
2e5c1fa3be New upstream version 1.37.22. 2017-09-05 09:52:06 +01:00
Richard W.M. Jones
6cd3388a5c Disable zfs subpackage on s390, s390x. 2017-08-19 17:41:47 +01:00
Richard W.M. Jones
1d53743969 New upstream version 1.37.21. 2017-08-09 21:12:41 +01:00
Richard W.M. Jones
bfca8190ac OCaml 4.05.0 rebuild. 2017-08-08 14:22:09 +01:00
Richard W.M. Jones
a65ce5f485 New upstream version 1.37.20. 2017-08-04 08:51:40 +01:00
Fedora Release Engineering
a151621171 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 01:35:21 +00:00
Richard W.M. Jones
b33fa370d0 ocaml-hivex-devel, not ocaml-hivex 2017-07-29 09:01:33 +01:00
Richard W.M. Jones
7c48de4082 Add new build dependency ocaml-hivex. 2017-07-29 08:31:03 +01:00
Richard W.M. Jones
bd815fe52b New upstream version 1.37.19. 2017-07-29 08:27:21 +01:00
Fedora Release Engineering
02b97ca4fe - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 18:58:37 +00:00
Richard W.M. Jones
b2e667438f New upstream version 1.37.18. 2017-07-18 23:28:52 +01:00
Richard W.M. Jones
c7aa6a9556 Add new man page guestfs-gobject(3) to libguestfs-gobject-devel. 2017-07-13 13:13:25 +01:00
Richard W.M. Jones
768b0905ad Drop libguestfs-gobject-doc because gtk-doc is no longer provided upstream. 2017-07-13 12:55:18 +01:00
Richard W.M. Jones
85a051511c New upstream version 1.37.17. 2017-07-11 13:44:22 +01:00
Richard W.M. Jones
042f8d5407 OCaml 4.04.2 rebuild. 2017-06-26 22:25:26 +01:00
Richard W.M. Jones
44d4f2b62e New upstream version 1.37.16. 2017-06-23 10:47:55 +01:00
Jitka Plesnikova
bc25764f3b Perl 5.26 rebuild 2017-06-06 03:12:49 +02:00
Richard W.M. Jones
66b3f9f867 Disable running tests on s390x.
qemu-system-s390x TCG cannot emulate enough to boot the kernel.
2017-05-23 11:14:00 +01:00
Richard W.M. Jones
dd46ffb390 Bump release and rebuild for ppc64, ppc64le and s390x. 2017-05-22 21:09:20 +01:00
Richard W.M. Jones
bf91135584 Revert "Disable builds on POWER." and "Disable builds on s390x."
POWER bug is worked around (see
https://bugzilla.redhat.com/show_bug.cgi?id=1452813).

s390x bug is fixed (see
https://bugzilla.redhat.com/show_bug.cgi?id=1452792).

This reverts commit fa32854257.

This reverts commit 4d67ac5ae8.
2017-05-22 21:06:11 +01:00
Richard W.M. Jones
fa32854257 Disable builds on POWER.
qemu is broken on ppc64 and ppc64le.
https://bugzilla.redhat.com/show_bug.cgi?id=1452813
2017-05-19 18:12:40 +01:00
Richard W.M. Jones
4d67ac5ae8 Disable builds on s390x.
s390utils-base is uninstallable in Rawhide at the moment.
https://bugzilla.redhat.com/show_bug.cgi?id=1452792
2017-05-19 17:08:55 +01:00
Richard W.M. Jones
343b3dc3a0 New upstream version 1.37.14. 2017-05-19 16:44:24 +01:00
Richard W.M. Jones
eff54a4628 Try enabling sanity tests on s390x, since I fixed it upstream in 1.37.14. 2017-05-18 21:50:05 +01:00
Richard W.M. Jones
559e0ff2ba OCaml 4.04.1 rebuild. 2017-05-12 15:18:52 +01:00
Richard W.M. Jones
d75f43946b New upstream version 1.37.13. 2017-05-08 23:52:33 +01:00
Richard W.M. Jones
8278d4f686 New upstream version 1.37.12. 2017-04-26 11:00:00 +01:00
Richard W.M. Jones
b15921b88d New upstream version 1.37.11. 2017-04-15 08:57:38 +01:00
Richard W.M. Jones
d331572aa7 New upstream version 1.37.10. 2017-04-12 08:54:52 +01:00
Richard W.M. Jones
2f067e943f New upstream version 1.37.9. 2017-04-08 07:50:16 +01:00
Richard W.M. Jones
44ca54113a Depend on gnupg2 at runtime (RHBZ#1438939).
Thanks: Igor Gnatenko, Neal Gompa for advice.
2017-04-06 13:34:01 +01:00
Richard W.M. Jones
b34bc35715 Change libosinfo -> osinfo-db. 2017-04-06 10:34:41 +01:00
Richard W.M. Jones
2c179a1ef7 Add BR squashfs-tools. 2017-04-06 10:34:22 +01:00
Richard W.M. Jones
5b3d4bfa77 New upstream version 1.37.8. 2017-03-31 09:11:59 +01:00
Richard W.M. Jones
b12ceb145a Add back ppc64, but ppc64le tests are still broken. 2017-03-25 07:54:11 +00:00
Richard W.M. Jones
0c5c45106f New upstream version 1.37.7. 2017-03-24 22:18:01 +00:00
Richard W.M. Jones
67718b0ac8 Try enabling power64 tests again. 2017-03-24 21:31:58 +00:00
Richard W.M. Jones
cc69908e53 New upstream version 1.37.6. 2017-03-20 22:48:28 +00:00
Richard W.M. Jones
8a53c8a8c3 New upstream version 1.37.2. 2017-03-14 10:10:35 +00:00
Richard W.M. Jones
683d98cd6d New upstream version 1.37.1. 2017-03-07 22:19:29 +00:00
Richard W.M. Jones
43320b299b Revert "New upstream version 1.36.1."
This reverts commit 778c71f0ae.

Accidentally committed to the master branch, should have been in f26
branch.
2017-03-01 14:22:29 +00:00
Richard W.M. Jones
96537d9508 Revert "Fix Source URLs (1.34 -> 1.36)."
This reverts commit 9bb13a3a1f.

Accidentally committed to the master branch, should have been in f26
branch.
2017-03-01 14:22:07 +00:00
Richard W.M. Jones
9bb13a3a1f Fix Source URLs (1.34 -> 1.36). 2017-03-01 10:32:32 +00:00
Richard W.M. Jones
778c71f0ae New upstream version 1.36.1. 2017-03-01 10:32:03 +00:00
20 changed files with 1467 additions and 3188 deletions

View file

@ -1,126 +0,0 @@
From 2e70ca8b362e53976717a7519052faeffc31d4f2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Mar 2017 12:42:46 +0000
Subject: [PATCH 01/10] generator: Deprecate direct mode (guestfs_set_direct,
guestfs_get_direct).
(cherry picked from commit 26948d5cb17391a32856b18b8a5d6ae58a179507)
---
generator/actions_properties.ml | 28 ----------------------------
generator/actions_properties_deprecated.ml | 30 ++++++++++++++++++++++++++++++
rescue/rescue.c | 3 +++
test-tool/test-tool.c | 1 -
4 files changed, 33 insertions(+), 29 deletions(-)
diff --git a/generator/actions_properties.ml b/generator/actions_properties.ml
index 8f6455b81..87144b14f 100644
--- a/generator/actions_properties.ml
+++ b/generator/actions_properties.ml
@@ -260,34 +260,6 @@ C<guestfs_set_event_callback>)." };
Return the command trace flag." };
{ defaults with
- name = "set_direct"; added = (1, 0, 72);
- style = RErr, [Bool "direct"], [];
- fish_alias = ["direct"]; config_only = true;
- blocking = false;
- shortdesc = "enable or disable direct appliance mode";
- longdesc = "\
-If the direct appliance mode flag is enabled, then stdin and
-stdout are passed directly through to the appliance once it
-is launched.
-
-One consequence of this is that log messages aren't caught
-by the library and handled by C<guestfs_set_log_message_callback>,
-but go straight to stdout.
-
-You probably don't want to use this unless you know what you
-are doing.
-
-The default is disabled." };
-
- { defaults with
- name = "get_direct"; added = (1, 0, 72);
- style = RBool "direct", [], [];
- blocking = false;
- shortdesc = "get direct appliance mode flag";
- longdesc = "\
-Return the direct appliance mode flag." };
-
- { defaults with
name = "set_recovery_proc"; added = (1, 0, 77);
style = RErr, [Bool "recoveryproc"], [];
fish_alias = ["recovery-proc"]; config_only = true;
diff --git a/generator/actions_properties_deprecated.ml b/generator/actions_properties_deprecated.ml
index def17b926..53277822e 100644
--- a/generator/actions_properties_deprecated.ml
+++ b/generator/actions_properties_deprecated.ml
@@ -125,6 +125,36 @@ Return the current backend.
See C<guestfs_set_backend> and L<guestfs(3)/BACKEND>." };
+ { defaults with
+ name = "set_direct"; added = (1, 0, 72);
+ style = RErr, [Bool "direct"], [];
+ deprecated_by = Deprecated_no_replacement;
+ fish_alias = ["direct"]; config_only = true;
+ blocking = false;
+ shortdesc = "enable or disable direct appliance mode";
+ longdesc = "\
+If the direct appliance mode flag is enabled, then stdin and
+stdout are passed directly through to the appliance once it
+is launched.
+
+One consequence of this is that log messages aren't caught
+by the library and handled by C<guestfs_set_log_message_callback>,
+but go straight to stdout.
+
+You probably don't want to use this unless you know what you
+are doing.
+
+The default is disabled." };
+
+ { defaults with
+ name = "get_direct"; added = (1, 0, 72);
+ style = RBool "direct", [], [];
+ deprecated_by = Deprecated_no_replacement;
+ blocking = false;
+ shortdesc = "get direct appliance mode flag";
+ longdesc = "\
+Return the direct appliance mode flag." };
+
]
let daemon_functions = [
diff --git a/rescue/rescue.c b/rescue/rescue.c
index 45967b2ad..b692e5a07 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -295,9 +295,12 @@ main (int argc, char *argv[])
usage (EXIT_FAILURE);
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/* Setting "direct mode" is required for the rescue appliance. */
if (guestfs_set_direct (g, 1) == -1)
exit (EXIT_FAILURE);
+#pragma GCC diagnostic pop
{
/* The libvirt backend doesn't support direct mode. As a temporary
diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c
index 20e2a32fa..2ae266d7d 100644
--- a/test-tool/test-tool.c
+++ b/test-tool/test-tool.c
@@ -224,7 +224,6 @@ main (int argc, char *argv[])
p = guestfs_get_cachedir (g);
printf ("guestfs_get_cachedir: %s\n", p ? : "(null)");
free (p);
- printf ("guestfs_get_direct: %d\n", guestfs_get_direct (g));
p = guestfs_get_hv (g);
printf ("guestfs_get_hv: %s\n", p);
free (p);
--
2.13.2

View file

@ -1,185 +0,0 @@
From 0fb454a7887727f7319fecc0caf2d55af3390062 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Mar 2017 11:06:27 +0000
Subject: [PATCH 02/10] New API: internal-get-console-socket to support
virt-rescue.
This API intended for use by virt-rescue only gets the file descriptor
of the console socket.
(cherry picked from commit 84c9f98c2e09a459ced3c7e85191f2e47d149a52)
---
generator/actions_core.ml | 11 +++++++
generator/actions_properties_deprecated.ml | 4 +--
lib/Makefile.am | 1 +
lib/conn-socket.c | 16 +++++++++-
lib/guestfs-internal.h | 3 ++
lib/rescue.c | 47 ++++++++++++++++++++++++++++++
6 files changed, 79 insertions(+), 3 deletions(-)
create mode 100644 lib/rescue.c
diff --git a/generator/actions_core.ml b/generator/actions_core.ml
index 5e487df02..259ca9051 100644
--- a/generator/actions_core.ml
+++ b/generator/actions_core.ml
@@ -1722,6 +1722,17 @@ call it returns a simple true/false boolean result, instead
of throwing an exception if a feature is not found. For
other documentation see C<guestfs_available>." };
+ { defaults with
+ name = "internal_get_console_socket"; added = (1, 37, 1);
+ style = RInt "fd", [], [];
+ visibility = VInternal;
+ test_excuse = "writing to the socket may block";
+ shortdesc = "get the appliance console socket";
+ longdesc = "\
+This call is used by L<virt-rescue(1)> to write directly to
+appliance console (for passing through keystrokes). It should
+not normally be used by other libguestfs users." };
+
]
let daemon_functions = [
diff --git a/generator/actions_properties_deprecated.ml b/generator/actions_properties_deprecated.ml
index 53277822e..f36509e75 100644
--- a/generator/actions_properties_deprecated.ml
+++ b/generator/actions_properties_deprecated.ml
@@ -128,7 +128,7 @@ See C<guestfs_set_backend> and L<guestfs(3)/BACKEND>." };
{ defaults with
name = "set_direct"; added = (1, 0, 72);
style = RErr, [Bool "direct"], [];
- deprecated_by = Deprecated_no_replacement;
+ deprecated_by = Replaced_by "internal_get_console_socket";
fish_alias = ["direct"]; config_only = true;
blocking = false;
shortdesc = "enable or disable direct appliance mode";
@@ -149,7 +149,7 @@ The default is disabled." };
{ defaults with
name = "get_direct"; added = (1, 0, 72);
style = RBool "direct", [], [];
- deprecated_by = Deprecated_no_replacement;
+ deprecated_by = Replaced_by "internal_get_console_socket";
blocking = false;
shortdesc = "get direct appliance mode flag";
longdesc = "\
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 22974187f..c3e013a52 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -117,6 +117,7 @@ libguestfs_la_SOURCES = \
private-data.c \
proto.c \
qemu.c \
+ rescue.c \
stringsbuf.c \
structs-compare.c \
structs-copy.c \
diff --git a/lib/conn-socket.c b/lib/conn-socket.c
index 2cd261a2b..8ecfed856 100644
--- a/lib/conn-socket.c
+++ b/lib/conn-socket.c
@@ -1,5 +1,5 @@
/* libguestfs
- * Copyright (C) 2013 Red Hat Inc.
+ * Copyright (C) 2013-2017 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
@@ -397,6 +397,19 @@ handle_log_message (guestfs_h *g,
return 1;
}
+static int
+get_console_sock (guestfs_h *g, struct connection *connv)
+{
+ struct connection_socket *conn = (struct connection_socket *) connv;
+
+ if (conn->console_sock == -1) {
+ error (g, _("console socket not connected"));
+ return -1;
+ }
+
+ return conn->console_sock;
+}
+
static void
free_conn_socket (guestfs_h *g, struct connection *connv)
{
@@ -418,6 +431,7 @@ static struct connection_ops ops = {
.read_data = read_data,
.write_data = write_data,
.can_read_data = can_read_data,
+ .get_console_sock = get_console_sock,
};
/**
diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h
index 949cacfef..51f532a1b 100644
--- a/lib/guestfs-internal.h
+++ b/lib/guestfs-internal.h
@@ -373,6 +373,9 @@ struct connection_ops {
* Returns: 1 = yes, 0 = no, -1 = error
*/
int (*can_read_data) (guestfs_h *g, struct connection *);
+
+ /* Get the console socket (to support virt-rescue). */
+ int (*get_console_sock) (guestfs_h *g, struct connection *);
};
/**
diff --git a/lib/rescue.c b/lib/rescue.c
new file mode 100644
index 000000000..ae7811a31
--- /dev/null
+++ b/lib/rescue.c
@@ -0,0 +1,47 @@
+/* libguestfs
+ * Copyright (C) 2017 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
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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 library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * Support for virt-rescue(1).
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <libintl.h>
+
+#include "guestfs.h"
+#include "guestfs-internal.h"
+#include "guestfs-internal-actions.h"
+
+int
+guestfs_impl_internal_get_console_socket (guestfs_h *g)
+{
+ if (!g->conn) {
+ error (g, _("no console socket, the handle must be launched"));
+ return -1;
+ }
+
+ if (!g->conn->ops->get_console_sock)
+ NOT_SUPPORTED (g, -1,
+ _("connection class does not support getting the console socket"));
+
+ return g->conn->ops->get_console_sock (g, g->conn);
+}
--
2.13.2

View file

@ -1,39 +0,0 @@
From e1f952372e3df410295c60ddbad24d45b93551af Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 3 Mar 2017 10:14:20 +0000
Subject: [PATCH 03/10] lib: Return EPIPE for "appliance closed the connection
unexpectedly".
(cherry picked from commit 8af9acd4e31e9880e14735b2242c496ee017c0d9)
---
lib/errors.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/lib/errors.c b/lib/errors.c
index c2af611ee..ace6a89cf 100644
--- a/lib/errors.c
+++ b/lib/errors.c
@@ -358,12 +358,15 @@ void
guestfs_int_unexpected_close_error (guestfs_h *g)
{
if (g->verbose)
- error (g, _("appliance closed the connection unexpectedly, see earlier error messages"));
+ guestfs_int_error_errno (g, EPIPE,
+ _("appliance closed the connection unexpectedly, "
+ "see earlier error messages"));
else
- error (g, _(
- "appliance closed the connection unexpectedly.\n"
- "This usually means the libguestfs appliance crashed.\n"
- DEBUG_ADVICE));
+ guestfs_int_error_errno (g, EPIPE,
+ _("appliance closed the connection unexpectedly.\n"
+ "This usually means the libguestfs appliance "
+ "crashed.\n"
+ DEBUG_ADVICE));
}
/**
--
2.13.2

View file

@ -1,533 +0,0 @@
From 20acc6cf3ebf873497e0be95bd5d3daad56cecd5 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 2 Mar 2017 13:46:48 +0000
Subject: [PATCH 04/10] rescue: Modify virt-rescue so it doesn't use direct
mode (RHBZ#1152819, RHBZ#1171654).
Instead of using "direct mode" (which was basically a quick hack),
virt-rescue now launches the appliance with a running daemon.
The daemon doesn't do much -- there is still a bash shell which the
user interacts with. The daemon is there simply to provide the
initial GUESTFS_LAUNCH_FLAG message and to handle shutdown a bit more
gracefully.
To interact with the shell, and replacing direct mode, virt-rescue now
prints out log messages (the output of the shell), and sends input
typed by the user directly to the console socket. This uses the
guestfs_internal_get_console_socket API added previously. Most of the
complexity behind this is hidden in virt-rescue.
This fully fixes the handling of ^C (RHBZ#1152819). Also there were
earlier reports that full screen commands like 'vim' didn't work well,
(RHBZ#1171654), but in this version vim appears to work fine, albeit
only using 80x24 of the screen because of the serial console.
(cherry picked from commit 32d60801443647b3523b9374c431fefdbf054e3c)
---
appliance/init | 91 ++++++++--------
rescue/Makefile.am | 1 +
rescue/rescue.c | 306 +++++++++++++++++++++++++++++++++++++++++++++--------
3 files changed, 312 insertions(+), 86 deletions(-)
diff --git a/appliance/init b/appliance/init
index 8a26e1a02..810f84d22 100755
--- a/appliance/init
+++ b/appliance/init
@@ -159,59 +159,62 @@ if test "$guestfs_verbose" = 1 && test "$guestfs_boot_analysis" != 1; then
echo -n "uptime: "; cat /proc/uptime
fi
-if ! test "$guestfs_rescue" = 1; then
- # Run the daemon.
- cmd="guestfsd"
- eval `grep -Eo 'guestfs_channel=[^[:space:]]+' /proc/cmdline`
- if test "x$guestfs_channel" != "x"; then
+# Run the daemon.
+cmd="guestfsd"
+eval `grep -Eo 'guestfs_channel=[^[:space:]]+' /proc/cmdline`
+if test "x$guestfs_channel" != "x"; then
cmd="$cmd --channel $guestfs_channel"
- fi
- if test "$guestfs_verbose" = 1; then
+fi
+if test "$guestfs_verbose" = 1; then
cmd="$cmd --verbose"
- fi
- if test "$guestfs_network" = 1; then
+fi
+if test "$guestfs_network" = 1; then
cmd="$cmd --network"
- fi
- echo $cmd
- $cmd
+fi
+if ! test "$guestfs_rescue" = 1; then
+ echo $cmd
+ $cmd
else
- # Run virt-rescue shell.
+ # Run virt-rescue shell.
- # Get name of the serial port, from console= passed by libguestfs.
- guestfs_serial=$(grep -Eo 'console=[^[:space:]]+' /proc/cmdline |
- sed s/console=//)
+ # We need a daemon, even in virt-rescue.
+ $cmd &
- # Remove LD_PRELOAD=libSegFault set above.
- unset LD_PRELOAD
+ # Get name of the serial port, from console= passed by libguestfs.
+ guestfs_serial=$(grep -Eo 'console=[^[:space:]]+' /proc/cmdline |
+ sed s/console=//)
- :> $HOME/.bashrc
- grep -Eo 'TERM=[^[:space:]]+' /proc/cmdline >> $HOME/.bashrc
- echo "PS1='><rescue> '" >> $HOME/.bashrc
- echo "export TERM PS1" >> $HOME/.bashrc
+ # Remove LD_PRELOAD=libSegFault set above.
+ unset LD_PRELOAD
- # The shell is opened by default on /dev/console, which (on Linux)
- # is not a controlling terminal, causing job control to fail. For
- # how we work around this, see:
- # https://busybox.net/FAQ.html#job_control
- run_bash_with_ctty ()
- {
- setsid bash -c \
- "exec bash </dev/$guestfs_serial >/dev/$guestfs_serial 2>&1"
- }
+ :> $HOME/.bashrc
+ grep -Eo 'TERM=[^[:space:]]+' /proc/cmdline >> $HOME/.bashrc
+ echo "PS1='><rescue> '" >> $HOME/.bashrc
+ echo "export TERM PS1" >> $HOME/.bashrc
- echo
- echo "------------------------------------------------------------"
- echo
- echo "Welcome to virt-rescue, the libguestfs rescue shell."
- echo
- echo "Note: The contents of / are the rescue appliance."
- echo "You have to mount the guest's partitions under /sysroot"
- echo "before you can examine them."
- echo
- run_bash_with_ctty
- echo
- echo "virt-rescue: Syncing the disk now before exiting ..."
- echo
+ # The shell is opened by default on /dev/console, which (on Linux)
+ # is not a controlling terminal, causing job control to fail. For
+ # how we work around this, see:
+ # https://busybox.net/FAQ.html#job_control
+ run_bash_with_ctty ()
+ {
+ setsid bash -c \
+ "exec bash </dev/$guestfs_serial >/dev/$guestfs_serial 2>&1"
+ }
+
+ echo
+ echo "------------------------------------------------------------"
+ echo
+ echo "Welcome to virt-rescue, the libguestfs rescue shell."
+ echo
+ echo "Note: The contents of / (root) are the rescue appliance."
+ echo "You have to mount the guest's partitions under /sysroot"
+ echo "before you can examine them."
+ echo
+ run_bash_with_ctty
+ echo
+ echo "virt-rescue: Syncing the disk now before exiting ..."
+ echo
fi
sync
diff --git a/rescue/Makefile.am b/rescue/Makefile.am
index 7919aafd5..99d4b79ae 100644
--- a/rescue/Makefile.am
+++ b/rescue/Makefile.am
@@ -30,6 +30,7 @@ virt_rescue_SOURCES = \
virt_rescue_CPPFLAGS = \
-DGUESTFS_WARN_DEPRECATED=1 \
+ -DGUESTFS_PRIVATE=1 \
-DLOCALEBASEDIR=\""$(datadir)/locale"\" \
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
diff --git a/rescue/rescue.c b/rescue/rescue.c
index b692e5a07..b145dcd40 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -23,21 +23,32 @@
#include <string.h>
#include <inttypes.h>
#include <unistd.h>
+#include <fcntl.h>
#include <getopt.h>
#include <errno.h>
#include <error.h>
+#include <signal.h>
+#include <termios.h>
+#include <poll.h>
#include <locale.h>
#include <assert.h>
#include <libintl.h>
+#include "full-write.h"
+#include "getprogname.h"
#include "ignore-value.h"
#include "xvasprintf.h"
-#include "getprogname.h"
#include "guestfs.h"
#include "options.h"
#include "display-options.h"
+static void log_message_callback (guestfs_h *g, void *opaque, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len);
+static void do_rescue (int sock);
+static void raw_tty (void);
+static void restore_tty (void);
+static void tstp_handler (int sig);
+static void cont_handler (int sig);
static void add_scratch_disks (int n, struct drv **drvs);
static void do_suggestion (struct drv *drvs);
@@ -54,6 +65,9 @@ int inspector = 0;
int in_guestfish = 0;
int in_virt_rescue = 1;
+/* Old terminal settings. */
+static struct termios old_termios;
+
static void __attribute__((noreturn))
usage (int status)
{
@@ -135,6 +149,8 @@ main (int argc, char *argv[])
int memsize = 0;
int smp = 0;
int suggest = 0;
+ char *append_full;
+ int sock;
g = guestfs_create ();
if (g == NULL)
@@ -295,30 +311,6 @@ main (int argc, char *argv[])
usage (EXIT_FAILURE);
}
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
- /* Setting "direct mode" is required for the rescue appliance. */
- if (guestfs_set_direct (g, 1) == -1)
- exit (EXIT_FAILURE);
-#pragma GCC diagnostic pop
-
- {
- /* The libvirt backend doesn't support direct mode. As a temporary
- * workaround, force the appliance backend, but warn about it.
- */
- CLEANUP_FREE char *backend = guestfs_get_backend (g);
- if (backend) {
- if (STREQ (backend, "libvirt") ||
- STRPREFIX (backend, "libvirt:")) {
- fprintf (stderr, _("%s: warning: virt-rescue doesn't work with the libvirt backend\n"
- "at the moment. As a workaround, forcing backend = 'direct'.\n"),
- getprogname ());
- if (guestfs_set_backend (g, "direct") == -1)
- exit (EXIT_FAILURE);
- }
- }
- }
-
/* Set other features. */
if (memsize > 0)
if (guestfs_set_memsize (g, memsize) == -1)
@@ -330,16 +322,15 @@ main (int argc, char *argv[])
if (guestfs_set_smp (g, smp) == -1)
exit (EXIT_FAILURE);
- {
- /* Kernel command line must include guestfs_rescue=1 (see
- * appliance/init) as well as other options.
- */
- CLEANUP_FREE char *append_full = xasprintf ("guestfs_rescue=1%s%s",
- append ? " " : "",
- append ? append : "");
- if (guestfs_set_append (g, append_full) == -1)
- exit (EXIT_FAILURE);
- }
+ /* Kernel command line must include guestfs_rescue=1 (see
+ * appliance/init) as well as other options.
+ */
+ append_full = xasprintf ("guestfs_rescue=1%s%s",
+ append ? " " : "",
+ append ? append : "");
+ if (guestfs_set_append (g, append_full) == -1)
+ exit (EXIT_FAILURE);
+ free (append_full);
/* Add drives. */
add_drives (drvs);
@@ -347,22 +338,253 @@ main (int argc, char *argv[])
/* Free up data structures, no longer needed after this point. */
free_drives (drvs);
- /* Run the appliance. This won't return until the user quits the
- * appliance.
+ /* Add an event handler to print "log messages". These will be the
+ * output of the appliance console during launch and shutdown.
+ * After launch, we will read the console messages directly from the
+ * socket and they won't be passed through the event callback.
*/
- if (!verbose)
- guestfs_set_error_handler (g, NULL, NULL);
+ if (guestfs_set_event_callback (g, log_message_callback,
+ GUESTFS_EVENT_APPLIANCE, 0, NULL) == -1)
+ exit (EXIT_FAILURE);
- /* We expect launch to fail, so ignore the return value, and don't
- * bother with explicit guestfs_shutdown either.
+ /* Run the appliance. */
+ if (guestfs_launch (g) == -1)
+ exit (EXIT_FAILURE);
+
+ sock = guestfs_internal_get_console_socket (g);
+ if (sock == -1)
+ exit (EXIT_FAILURE);
+
+ /* Try to set all sockets to non-blocking. */
+ if (fcntl (STDIN_FILENO, F_SETFL, O_NONBLOCK) == -1)
+ perror ("could not set stdin to non-blocking");
+ if (fcntl (STDOUT_FILENO, F_SETFL, O_NONBLOCK) == -1)
+ perror ("could not set stdout to non-blocking");
+ if (fcntl (sock, F_SETFL, O_NONBLOCK) == -1)
+ perror ("could not set console socket to non-blocking");
+
+ /* Save the initial state of the tty so we always have the original
+ * state to go back to.
+ */
+ if (tcgetattr (STDIN_FILENO, &old_termios) == -1) {
+ perror ("tcgetattr: stdin");
+ exit (EXIT_FAILURE);
+ }
+
+ /* Put stdin in raw mode so that we can receive ^C and other
+ * special keys.
+ */
+ raw_tty ();
+
+ /* Restore the tty settings when the process exits. */
+ atexit (restore_tty);
+
+ /* Catch tty stop and cont signals so we can cleanup.
+ * See https://www.gnu.org/software/libc/manual/html_node/Signaling-Yourself.html
*/
- ignore_value (guestfs_launch (g));
+ signal (SIGTSTP, tstp_handler);
+ signal (SIGCONT, cont_handler);
+
+ do_rescue (sock);
+
+ restore_tty ();
+
+ /* Shut down the appliance. */
+ guestfs_push_error_handler (g, NULL, NULL);
+ if (guestfs_shutdown (g) == -1) {
+ const char *err;
+
+ /* Ignore "appliance closed the connection unexpectedly" since
+ * this can happen if the user reboots the appliance.
+ */
+ if (guestfs_last_errno (g) == EPIPE)
+ goto next;
+ /* Otherwise it's a real error. */
+ err = guestfs_last_error (g);
+ fprintf (stderr, "libguestfs: error: %s\n", err);
+ exit (EXIT_FAILURE);
+ }
+ next:
+ guestfs_pop_error_handler (g);
guestfs_close (g);
exit (EXIT_SUCCESS);
}
+static void
+log_message_callback (guestfs_h *g, void *opaque, uint64_t event,
+ int event_handle, int flags,
+ const char *buf, size_t buf_len,
+ const uint64_t *array, size_t array_len)
+{
+ if (buf_len > 0) {
+ ignore_value (full_write (STDOUT_FILENO, buf, buf_len));
+ }
+}
+
+/* This is the main loop for virt-rescue. We read and write
+ * directly to the console socket.
+ */
+#define BUFSIZE 4096
+static char rbuf[BUFSIZE]; /* appliance -> local tty */
+static char wbuf[BUFSIZE]; /* local tty -> appliance */
+
+static void
+do_rescue (int sock)
+{
+ size_t rlen = 0;
+ size_t wlen = 0;
+
+ while (sock >= 0 || rlen > 0) {
+ struct pollfd fds[3];
+ nfds_t nfds = 2;
+ int r;
+ ssize_t n;
+
+ fds[0].fd = STDIN_FILENO;
+ fds[0].events = 0;
+ if (BUFSIZE-wlen > 0)
+ fds[0].events = POLLIN;
+ fds[0].revents = 0;
+
+ fds[1].fd = STDOUT_FILENO;
+ fds[1].events = 0;
+ if (rlen > 0)
+ fds[1].events |= POLLOUT;
+ fds[1].revents = 0;
+
+ if (sock >= 0) {
+ fds[2].fd = sock;
+ fds[2].events = 0;
+ if (BUFSIZE-rlen > 0)
+ fds[2].events |= POLLIN;
+ if (wlen > 0)
+ fds[2].events |= POLLOUT;
+ fds[2].revents = 0;
+ nfds++;
+ }
+
+ r = poll (fds, nfds, -1);
+ if (r == -1) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+ perror ("poll");
+ return;
+ }
+
+ /* Input from local tty. */
+ if ((fds[0].revents & POLLIN) != 0) {
+ assert (BUFSIZE-wlen > 0);
+ n = read (STDIN_FILENO, wbuf+wlen, BUFSIZE-wlen);
+ if (n == -1) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+ perror ("read");
+ return;
+ }
+ if (n == 0) {
+ /* We don't expect this to happen. Maybe the whole tty went away?
+ * Anyway, we should exit as soon as possible.
+ */
+ return;
+ }
+ if (n > 0)
+ wlen += n;
+ }
+
+ /* Log message from appliance. */
+ if (nfds > 2 && (fds[2].revents & POLLIN) != 0) {
+ assert (BUFSIZE-rlen > 0);
+ n = read (sock, rbuf+rlen, BUFSIZE-rlen);
+ if (n == -1) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+ if (errno == ECONNRESET)
+ goto appliance_closed;
+ perror ("read");
+ return;
+ }
+ if (n == 0) {
+ appliance_closed:
+ sock = -1;
+ /* Don't actually close the socket, because it's owned by
+ * the guestfs handle.
+ */
+ continue;
+ }
+ if (n > 0)
+ rlen += n;
+ }
+
+ /* Write log messages to local tty. */
+ if ((fds[1].revents & POLLOUT) != 0) {
+ assert (rlen > 0);
+ n = write (STDOUT_FILENO, rbuf, rlen);
+ if (n == -1) {
+ perror ("write");
+ continue;
+ }
+ rlen -= n;
+ memmove (rbuf, rbuf+n, rlen);
+ }
+
+ /* Write commands to the appliance. */
+ if (nfds > 2 && (fds[2].revents & POLLOUT) != 0) {
+ assert (wlen > 0);
+ n = write (sock, wbuf, wlen);
+ if (n == -1) {
+ perror ("write");
+ continue;
+ }
+ wlen -= n;
+ memmove (wbuf, wbuf+n, wlen);
+ }
+ }
+}
+
+/* Put the tty in raw mode. */
+static void
+raw_tty (void)
+{
+ struct termios termios;
+
+ if (tcgetattr (STDIN_FILENO, &termios) == -1) {
+ perror ("tcgetattr: stdin");
+ exit (EXIT_FAILURE);
+ }
+ cfmakeraw (&termios);
+ if (tcsetattr (STDIN_FILENO, TCSANOW, &termios) == -1) {
+ perror ("tcsetattr: stdin");
+ exit (EXIT_FAILURE);
+ }
+}
+
+/* Restore the tty to (presumably) cooked mode as it was when
+ * the program was started.
+ */
+static void
+restore_tty (void)
+{
+ tcsetattr (STDIN_FILENO, TCSANOW, &old_termios);
+}
+
+/* When we get SIGTSTP, switch back to cooked mode. */
+static void
+tstp_handler (int sig)
+{
+ restore_tty ();
+ signal (SIGTSTP, SIG_DFL);
+ raise (SIGTSTP);
+}
+
+/* When we get SIGCONF, switch to raw mode. */
+static void
+cont_handler (int sig)
+{
+ raw_tty ();
+}
+
static void suggest_filesystems (void);
static int
--
2.13.2

View file

@ -1,400 +0,0 @@
From b308fb2a8d31f5439793b908bbf2e8414ee97897 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 3 Mar 2017 13:52:31 +0000
Subject: [PATCH 05/10] rescue: Implement -m and -i options.
`virt-rescue -a disk -i' does the right thing.
`-m' was previously an alternate form of `--memsize'. By sniffing the
parameter we can make `-m MB' continue to work, while also allowing
`-m' to be used as a short form for the `--mount' option.
This also removes most of the description of `--suggest' from the man
page, since it is no longer needed.
(cherry picked from commit 33d2ae796119ae5dd38e2afcbf1ba4216bd99846)
---
appliance/init | 12 +++++--
rescue/Makefile.am | 3 +-
rescue/rescue.c | 87 +++++++++++++++++++++++++++++++++++++-------------
rescue/virt-rescue.pod | 80 ++++++++++++++++++++++++++++------------------
4 files changed, 126 insertions(+), 56 deletions(-)
diff --git a/appliance/init b/appliance/init
index 810f84d22..968429c4b 100755
--- a/appliance/init
+++ b/appliance/init
@@ -180,6 +180,10 @@ else
# We need a daemon, even in virt-rescue.
$cmd &
+ # XXX This gives a bit of time for virt-rescue to connect to the
+ # daemon and mount any filesystems.
+ sleep 2
+
# Get name of the serial port, from console= passed by libguestfs.
guestfs_serial=$(grep -Eo 'console=[^[:space:]]+' /proc/cmdline |
sed s/console=//)
@@ -208,8 +212,12 @@ else
echo "Welcome to virt-rescue, the libguestfs rescue shell."
echo
echo "Note: The contents of / (root) are the rescue appliance."
- echo "You have to mount the guest's partitions under /sysroot"
- echo "before you can examine them."
+ if ! test -d "/sysroot/dev"; then
+ echo "You have to mount the guest's partitions under /sysroot"
+ echo "before you can examine them."
+ else
+ echo "Use 'cd /sysroot' or 'chroot /sysroot' to see guest filesystems."
+ fi
echo
run_bash_with_ctty
echo
diff --git a/rescue/Makefile.am b/rescue/Makefile.am
index 99d4b79ae..c83c43458 100644
--- a/rescue/Makefile.am
+++ b/rescue/Makefile.am
@@ -35,7 +35,7 @@ virt_rescue_CPPFLAGS = \
-I$(top_srcdir)/common/utils -I$(top_builddir)/common/utils \
-I$(top_srcdir)/lib -I$(top_builddir)/lib \
-I$(top_srcdir)/common/options -I$(top_builddir)/common/options \
- -I$(top_srcdir)/fish \
+ -I$(top_srcdir)/common/windows -I$(top_builddir)/common/windows \
-I$(srcdir)/../gnulib/lib -I../gnulib/lib
virt_rescue_CFLAGS = \
@@ -43,6 +43,7 @@ virt_rescue_CFLAGS = \
$(LIBXML2_CFLAGS)
virt_rescue_LDADD = \
+ $(top_builddir)/common/windows/libwindows.la \
$(top_builddir)/common/options/liboptions.la \
$(top_builddir)/common/utils/libutils.la \
$(top_builddir)/lib/libguestfs.la \
diff --git a/rescue/rescue.c b/rescue/rescue.c
index b145dcd40..2b461378d 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -23,7 +23,6 @@
#include <string.h>
#include <inttypes.h>
#include <unistd.h>
-#include <fcntl.h>
#include <getopt.h>
#include <errno.h>
#include <error.h>
@@ -37,9 +36,11 @@
#include "full-write.h"
#include "getprogname.h"
#include "ignore-value.h"
+#include "nonblocking.h"
#include "xvasprintf.h"
#include "guestfs.h"
+#include "windows.h"
#include "options.h"
#include "display-options.h"
@@ -87,7 +88,9 @@ usage (int status)
" -d|--domain guest Add disks from libvirt guest\n"
" --format[=raw|..] Force disk format for -a option\n"
" --help Display brief help\n"
- " -m|--memsize MB Set memory size in megabytes\n"
+ " -i|--inspector Automatically mount filesystems\n"
+ " -m|--mount dev[:mnt[:opts[:fstype]] Mount dev on mnt (if omitted, /)\n"
+ " --memsize MB Set memory size in megabytes\n"
" --network Enable network\n"
" -r|--ro Access read-only\n"
" --scratch[=N] Add scratch disk(s)\n"
@@ -116,7 +119,7 @@ main (int argc, char *argv[])
enum { HELP_OPTION = CHAR_MAX + 1 };
- static const char options[] = "a:c:d:m:rvVwx";
+ static const char options[] = "a:c:d:im:rvVwx";
static const struct option long_options[] = {
{ "add", 1, 0, 'a' },
{ "append", 1, 0, 0 },
@@ -124,8 +127,10 @@ main (int argc, char *argv[])
{ "domain", 1, 0, 'd' },
{ "format", 2, 0, 0 },
{ "help", 0, 0, HELP_OPTION },
+ { "inspector", 0, 0, 'i' },
{ "long-options", 0, 0, 0 },
- { "memsize", 1, 0, 'm' },
+ { "mount", 1, 0, 'm' },
+ { "memsize", 1, 0, 0 },
{ "network", 0, 0, 0 },
{ "ro", 0, 0, 'r' },
{ "rw", 0, 0, 'w' },
@@ -140,13 +145,16 @@ main (int argc, char *argv[])
};
struct drv *drvs = NULL;
struct drv *drv;
+ struct mp *mps = NULL;
+ struct mp *mp;
+ char *p;
const char *format = NULL;
bool format_consumed = true;
int c;
int option_index;
int network = 0;
const char *append = NULL;
- int memsize = 0;
+ int memsize = 0, m;
int smp = 0;
int suggest = 0;
char *append_full;
@@ -196,6 +204,10 @@ main (int argc, char *argv[])
_("--scratch parameter '%s' should be >= 1"), optarg);
add_scratch_disks (n, &drvs);
}
+ } else if (STREQ (long_options[option_index].name, "memsize")) {
+ if (sscanf (optarg, "%d", &memsize) != 1)
+ error (EXIT_FAILURE, 0,
+ _("could not parse memory size '%s'"), optarg);
} else
error (EXIT_FAILURE, 0,
_("unknown long option: %s (%d)"),
@@ -214,10 +226,19 @@ main (int argc, char *argv[])
OPTION_d;
break;
+ case 'i':
+ OPTION_i;
+ break;
+
case 'm':
- if (sscanf (optarg, "%d", &memsize) != 1)
- error (EXIT_FAILURE, 0,
- _("could not parse memory size '%s'"), optarg);
+ /* For backwards compatibility with virt-rescue <= 1.36, we
+ * must handle -m <number> as a synonym for --memsize.
+ */
+ if (sscanf (optarg, "%d", &m) == 1)
+ memsize = m;
+ else {
+ OPTION_m;
+ }
break;
case 'r':
@@ -288,7 +309,6 @@ main (int argc, char *argv[])
* options parsing code. Assert here that they have known-good
* values.
*/
- assert (inspector == 0);
assert (keys_from_stdin == 0);
assert (echo_keys == 0);
assert (live == 0);
@@ -332,12 +352,6 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
free (append_full);
- /* Add drives. */
- add_drives (drvs);
-
- /* Free up data structures, no longer needed after this point. */
- free_drives (drvs);
-
/* Add an event handler to print "log messages". These will be the
* output of the appliance console during launch and shutdown.
* After launch, we will read the console messages directly from the
@@ -347,21 +361,50 @@ main (int argc, char *argv[])
GUESTFS_EVENT_APPLIANCE, 0, NULL) == -1)
exit (EXIT_FAILURE);
- /* Run the appliance. */
+ /* Do the guest drives and mountpoints. */
+ add_drives (drvs);
if (guestfs_launch (g) == -1)
exit (EXIT_FAILURE);
+ if (inspector)
+ inspect_mount ();
+ mount_mps (mps);
+
+ free_drives (drvs);
+ free_mps (mps);
+
+ /* Also bind-mount /dev etc under /sysroot, if -i was given. */
+ if (inspector) {
+ CLEANUP_FREE_STRING_LIST char **roots;
+ int windows;
+
+ roots = guestfs_inspect_get_roots (g);
+ windows = roots && roots[0] && is_windows (g, roots[0]);
+ if (!windows) {
+ const char *cmd[5] = { "mount", "--rbind", NULL, NULL, NULL };
+ char *r;
+
+ cmd[2] = "/dev"; cmd[3] = "/sysroot/dev";
+ r = guestfs_debug (g, "sh", (char **) cmd);
+ free (r);
+
+ cmd[2] = "/proc"; cmd[3] = "/sysroot/proc";
+ r = guestfs_debug (g, "sh", (char **) cmd);
+ free (r);
+
+ cmd[2] = "/sys"; cmd[3] = "/sysroot/sys";
+ r = guestfs_debug (g, "sh", (char **) cmd);
+ free (r);
+ }
+ }
sock = guestfs_internal_get_console_socket (g);
if (sock == -1)
exit (EXIT_FAILURE);
/* Try to set all sockets to non-blocking. */
- if (fcntl (STDIN_FILENO, F_SETFL, O_NONBLOCK) == -1)
- perror ("could not set stdin to non-blocking");
- if (fcntl (STDOUT_FILENO, F_SETFL, O_NONBLOCK) == -1)
- perror ("could not set stdout to non-blocking");
- if (fcntl (sock, F_SETFL, O_NONBLOCK) == -1)
- perror ("could not set console socket to non-blocking");
+ ignore_value (set_nonblocking_flag (STDIN_FILENO, 1));
+ ignore_value (set_nonblocking_flag (STDOUT_FILENO, 1));
+ ignore_value (set_nonblocking_flag (sock, 1));
/* Save the initial state of the tty so we always have the original
* state to go back to.
diff --git a/rescue/virt-rescue.pod b/rescue/virt-rescue.pod
index b8aa32637..b651f84e7 100644
--- a/rescue/virt-rescue.pod
+++ b/rescue/virt-rescue.pod
@@ -6,9 +6,7 @@ virt-rescue - Run a rescue shell on a virtual machine
virt-rescue [--options] -d domname
- virt-rescue [--options] -a disk.img [-a disk.img ...]
-
- virt-rescue --suggest (-d domname | -a disk.img ...)
+ virt-rescue [--options] -a disk.img [-a disk.img ...] [-i]
Old style:
@@ -26,13 +24,13 @@ machine or disk image.
You can run virt-rescue on any virtual machine known to libvirt, or
directly on disk image(s):
- virt-rescue -d GuestName
+ virt-rescue -d GuestName -i
- virt-rescue --ro -a /path/to/disk.img
+ virt-rescue --ro -a /path/to/disk.img -i
virt-rescue -a /dev/sdc
-For live VMs you I<must> use the --ro option.
+For live VMs you I<must> use the I<--ro> option.
When you run virt-rescue on a virtual machine or disk image, you are
placed in an interactive bash shell where you can use many ordinary
@@ -41,26 +39,10 @@ rescue appliance. You must mount the virtual machine's filesystems by
hand. There is an empty directory called F</sysroot> where you can
mount filesystems.
-You can get virt-rescue to suggest mount commands for you by using the
-I<--suggest> option (in another terminal):
-
- $ virt-rescue --suggest -d Fedora15
- Inspecting the virtual machine or disk image ...
-
- This disk contains one or more operating systems. You can use these
- mount commands in virt-rescue (at the ><rescue> prompt) to mount the
- filesystems.
-
- # /dev/vg_f15x32/lv_root is the root of a linux operating system
- # type: linux, distro: fedora, version: 15.0
- # Fedora release 15 (Lovelock)
-
- mount /dev/vg_f15x32/lv_root /sysroot/
- mount /dev/vda1 /sysroot/boot
- mount --bind /dev /sysroot/dev
- mount --bind /dev/pts /sysroot/dev/pts
- mount --bind /proc /sysroot/proc
- mount --bind /sys /sysroot/sys
+To automatically mount the virtual machine's filesystems under
+F</sysroot> use the I<-i> option. This uses libguestfs inspection to
+find the filesystems and mount them in the right place. You can also
+mount filesystems individually using the I<-m> option.
Another way is to list the logical volumes (with L<lvs(8)>) and
partitions (with L<parted(8)>) and mount them by hand:
@@ -170,7 +152,15 @@ 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).
-=item B<-m> MB
+=item B<-i>
+
+=item B<--inspector>
+
+Using L<virt-inspector(1)> code, inspect the disks looking for
+an operating system and mount filesystems as they would be
+mounted on the real virtual machine.
+
+The filesystems are mounted on F</sysroot> in the rescue environment.
=item B<--memsize> MB
@@ -179,6 +169,33 @@ default is set by libguestfs and is small but adequate for running
system tools. The occasional program might need more memory. The
parameter is specified in megabytes.
+=item B<-m> dev[:mountpoint[:options[:fstype]]]
+
+=item B<--mount> dev[:mountpoint[:options[:fstype]]]
+
+Mount the named partition or logical volume on the given mountpoint
+B<in the guest> (this has nothing to do with mountpoints in the host).
+
+If the mountpoint is omitted, it defaults to F</>. You have to mount
+something on F</>.
+
+The filesystems are mounted under F</sysroot> in the rescue environment.
+
+The third (and rarely used) part of the mount parameter is the list of
+mount options used to mount the underlying filesystem. If this is not
+given, then the mount options are either the empty string or C<ro>
+(the latter if the I<--ro> flag is used). By specifying the mount
+options, you override this default choice. Probably the only time you
+would use this is to enable ACLs and/or extended attributes if the
+filesystem can support them:
+
+ -m /dev/sda1:/:acl,user_xattr
+
+The fourth part of the parameter is the filesystem driver to use, such
+as C<ext3> or C<ntfs>. This is rarely needed, but can be useful if
+multiple drivers are valid for a filesystem (eg: C<ext2> and C<ext3>),
+or if libguestfs misidentifies a filesystem.
+
=item B<--network>
Enable QEMU user networking in the guest. See L</NETWORK>.
@@ -217,9 +234,10 @@ Enable N E<ge> 2 virtual CPUs in the rescue appliance.
=item B<--suggest>
-Inspect the disk image and suggest what mount commands should be used
-to mount the disks. You should use the I<--suggest> option in a
-second terminal, then paste the commands into another virt-rescue.
+This option was used in older versions of virt-rescue to suggest what
+commands you could use to mount filesystems under F</sysroot>. For
+the current version of virt-rescue, it is easier to use the I<-i>
+option instead.
This option implies I<--ro> and is safe to use even if the guest is up
or if another virt-rescue is running.
@@ -240,7 +258,7 @@ Display version number and exit.
=item B<--rw>
-This changes the I<-a> and I<-d> options so that disks are
+This changes the I<-a>, I<-d> and I<-m> options so that disks are
added and mounts are done read-write.
See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>.
--
2.13.2

View file

@ -1,615 +0,0 @@
From 323350c82b49ac4d3519fe7ef9959c79dd9a83db Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 4 Mar 2017 11:47:59 +0000
Subject: [PATCH 06/10] rescue: Implement escape sequences.
This implements a few useful escape sequences:
><rescue> ^]?
virt-rescue escape sequences:
^] ? - print this message
^] h - print this message
^] q - quit virt-rescue
^] s - sync the filesystems
^] u - unmount filesystems
^] x - quit virt-rescue
^] z - suspend virt-rescue
to pass the escape key through to the rescue shell, type it twice
^]i
root device: /dev/sda3
product name: Fedora 25 (Twenty Five)
type: linux
distro: fedora
^]z
[3]+ Stopped ./run virt-rescue --scratch
$ fg
><rescue> ^]u
unmounting filesystems ...
[ 21.158558] XFS (sda3): Unmounting Filesystem
(cherry picked from commit 3637c42f4e521eb647d7dfae7f48eb1689d0af54)
---
rescue/Makefile.am | 4 +-
rescue/escape.c | 302 +++++++++++++++++++++++++++++++++++++++++++++++++
rescue/rescue.c | 30 ++++-
rescue/rescue.h | 47 ++++++++
rescue/virt-rescue.pod | 74 ++++++++++++
5 files changed, 454 insertions(+), 3 deletions(-)
create mode 100644 rescue/escape.c
create mode 100644 rescue/rescue.h
diff --git a/rescue/Makefile.am b/rescue/Makefile.am
index c83c43458..eb60bafa4 100644
--- a/rescue/Makefile.am
+++ b/rescue/Makefile.am
@@ -26,7 +26,9 @@ EXTRA_DIST = \
bin_PROGRAMS = virt-rescue
virt_rescue_SOURCES = \
- rescue.c
+ escape.c \
+ rescue.c \
+ rescue.h
virt_rescue_CPPFLAGS = \
-DGUESTFS_WARN_DEPRECATED=1 \
diff --git a/rescue/escape.c b/rescue/escape.c
new file mode 100644
index 000000000..f7f7d84c4
--- /dev/null
+++ b/rescue/escape.c
@@ -0,0 +1,302 @@
+/* virt-rescue
+ * Copyright (C) 2010-2017 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <unistd.h>
+#include <signal.h>
+#include <locale.h>
+#include <libintl.h>
+
+#include "c-ctype.h"
+
+#include "guestfs.h"
+#include "guestfs-internal-frontend.h"
+
+#include "rescue.h"
+
+static void print_help (void);
+static void print_inspector (void);
+static void crlf (void);
+static void print_escape_key (void);
+
+/* Parse the -e parameter from the command line. */
+int
+parse_escape_key (const char *arg)
+{
+ size_t len;
+
+ if (STREQ (arg, "none"))
+ return 0;
+
+ len = strlen (arg);
+ if (arg == 0)
+ return -1;
+
+ switch (arg[0]) {
+ case '^':
+ if (len == 2 &&
+ ((arg[1] >= 'a' && arg[1] <= 'z') ||
+ (arg[1] >= 'A' && arg[1] <= '_'))) {
+ return c_toupper (arg[1]) - '@';
+ }
+ else
+ return -1;
+ break;
+ }
+
+ return -1;
+}
+
+/* Print one-line end user description of the escape key.
+ *
+ * This is printed when virt-rescue starts.
+ */
+void
+print_escape_key_help (void)
+{
+ crlf ();
+ /* Difficult to translate this string. XXX */
+ printf ("The virt-rescue escape key is ");
+ print_escape_key ();
+ printf (". Type ");
+ print_escape_key ();
+ printf (" h for help.");
+ crlf ();
+}
+
+void
+init_escape_state (struct escape_state *state)
+{
+ state->in_escape = false;
+}
+
+/* Process escapes in the tty input buffer.
+ *
+ * This function has a state parameter so that we can handle an escape
+ * sequence split over the end of the buffer.
+ *
+ * Escape sequences are removed from the buffer.
+ *
+ * Returns true iff virt-rescue should exit.
+ */
+bool
+process_escapes (struct escape_state *state, char *buf, size_t *len)
+{
+ size_t i;
+
+ for (i = 0; i < *len; ++i) {
+#define DROP_CURRENT_CHAR() \
+ memmove (&buf[i], &buf[i+1], --(*len))
+#define PRINT_ESC() \
+ do { print_escape_key (); putchar (buf[i]); crlf (); } while (0)
+
+ if (!state->in_escape) {
+ if (buf[i] == escape_key) {
+ /* Drop the escape key from the buffer and go to escape mode. */
+ DROP_CURRENT_CHAR ();
+ state->in_escape = true;
+ }
+ }
+ else /* in escape sequence */ {
+ if (buf[i] == escape_key) /* ^] ^] means send ^] to rescue shell */
+ state->in_escape = false;
+ else {
+ switch (buf[i]) {
+ case '?': case 'h':
+ PRINT_ESC ();
+ print_help ();
+ break;
+
+ case 'i':
+ PRINT_ESC ();
+ print_inspector ();
+ break;
+
+ case 'q': case 'x':
+ PRINT_ESC ();
+ return true /* exit virt-rescue at once */;
+
+ case 's':
+ PRINT_ESC ();
+ printf (_("attempting to sync filesystems ..."));
+ crlf ();
+ guestfs_sync (g);
+ break;
+
+ case 'u':
+ PRINT_ESC ();
+ printf (_("unmounting filesystems ..."));
+ crlf ();
+ guestfs_umount_all (g);
+ break;
+
+ case 'z':
+ PRINT_ESC ();
+ raise (SIGTSTP);
+ break;
+
+ default:
+ /* Any unrecognized escape sequence will be dropped. We
+ * could be obnoxious and ring the bell, but I hate it when
+ * programs do that.
+ */
+ break;
+ }
+
+ /* Drop the escape key and return to non-escape mode. */
+ DROP_CURRENT_CHAR ();
+ state->in_escape = false;
+
+ /* The output is line buffered, this is just to make sure
+ * everything gets written to stdout before we continue
+ * writing to STDOUT_FILENO.
+ */
+ fflush (stdout);
+ }
+ } /* in escape sequence */
+ } /* for */
+
+ return false /* don't exit */;
+}
+
+/* This is called when the user types ^] h */
+static void
+print_help (void)
+{
+ printf (_("virt-rescue escape sequences:"));
+ crlf ();
+
+ putchar (' ');
+ print_escape_key ();
+ printf (_(" ? - print this message"));
+ crlf ();
+
+ putchar (' ');
+ print_escape_key ();
+ printf (_(" h - print this message"));
+ crlf ();
+
+ if (inspector) {
+ putchar (' ');
+ print_escape_key ();
+ printf (_(" i - print inspection data"));
+ crlf ();
+ }
+
+ putchar (' ');
+ print_escape_key ();
+ printf (_(" q - quit virt-rescue"));
+ crlf ();
+
+ putchar (' ');
+ print_escape_key ();
+ printf (_(" s - sync the filesystems"));
+ crlf ();
+
+ putchar (' ');
+ print_escape_key ();
+ printf (_(" u - unmount filesystems"));
+ crlf ();
+
+ putchar (' ');
+ print_escape_key ();
+ printf (_(" x - quit virt-rescue"));
+ crlf ();
+
+ putchar (' ');
+ print_escape_key ();
+ printf (_(" z - suspend virt-rescue"));
+ crlf ();
+
+ printf (_("to pass the escape key through to the rescue shell, type it twice"));
+ crlf ();
+}
+
+/* This is called when the user types ^] i */
+static void
+print_inspector (void)
+{
+ CLEANUP_FREE_STRING_LIST char **roots;
+ size_t i;
+ const char *root;
+ char *str;
+
+ if (inspector) {
+ roots = guestfs_inspect_get_roots (g);
+ if (roots) {
+ crlf ();
+ for (i = 0; roots[i] != NULL; ++i) {
+ root = roots[i];
+ printf (_("root device: %s"), root);
+ crlf ();
+
+ str = guestfs_inspect_get_product_name (g, root);
+ if (str) {
+ printf (_(" product name: %s"), str);
+ crlf ();
+ }
+ free (str);
+
+ str = guestfs_inspect_get_type (g, root);
+ if (str) {
+ printf (_(" type: %s"), str);
+ crlf ();
+ }
+ free (str);
+
+ str = guestfs_inspect_get_distro (g, root);
+ if (str) {
+ printf (_(" distro: %s"), str);
+ crlf ();
+ }
+ free (str);
+ }
+ }
+ }
+}
+
+/* Because the terminal is in raw mode, we have to send CR LF instead
+ * of printing just \n.
+ */
+static void
+crlf (void)
+{
+ putchar ('\r');
+ putchar ('\n');
+}
+
+static void
+print_escape_key (void)
+{
+ switch (escape_key) {
+ case 0:
+ printf ("none");
+ break;
+ case '\x1'...'\x1f':
+ putchar ('^');
+ putchar (escape_key + '@');
+ break;
+ default:
+ abort ();
+ }
+}
diff --git a/rescue/rescue.c b/rescue/rescue.c
index 2b461378d..5281b1161 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -1,5 +1,5 @@
/* virt-rescue
- * Copyright (C) 2010-2012 Red Hat Inc.
+ * Copyright (C) 2010-2017 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,10 +40,14 @@
#include "xvasprintf.h"
#include "guestfs.h"
+#include "guestfs-internal-frontend.h"
+
#include "windows.h"
#include "options.h"
#include "display-options.h"
+#include "rescue.h"
+
static void log_message_callback (guestfs_h *g, void *opaque, uint64_t event, int event_handle, int flags, const char *buf, size_t buf_len, const uint64_t *array, size_t array_len);
static void do_rescue (int sock);
static void raw_tty (void);
@@ -65,6 +69,7 @@ const char *libvirt_uri = NULL;
int inspector = 0;
int in_guestfish = 0;
int in_virt_rescue = 1;
+int escape_key = '\x1d'; /* ^] */
/* Old terminal settings. */
static struct termios old_termios;
@@ -86,6 +91,7 @@ usage (int status)
" --append kernelopts Append kernel options\n"
" -c|--connect uri Specify libvirt URI for -d option\n"
" -d|--domain guest Add disks from libvirt guest\n"
+ " -e ^x|none Set or disable escape key (default ^])\n"
" --format[=raw|..] Force disk format for -a option\n"
" --help Display brief help\n"
" -i|--inspector Automatically mount filesystems\n"
@@ -119,7 +125,7 @@ main (int argc, char *argv[])
enum { HELP_OPTION = CHAR_MAX + 1 };
- static const char options[] = "a:c:d:im:rvVwx";
+ static const char options[] = "a:c:d:e:im:rvVwx";
static const struct option long_options[] = {
{ "add", 1, 0, 'a' },
{ "append", 1, 0, 0 },
@@ -226,6 +232,12 @@ main (int argc, char *argv[])
OPTION_d;
break;
+ case 'e':
+ escape_key = parse_escape_key (optarg);
+ if (escape_key == -1)
+ error (EXIT_FAILURE, 0, _("unrecognized escape key: %s"), optarg);
+ break;
+
case 'i':
OPTION_i;
break;
@@ -428,6 +440,10 @@ main (int argc, char *argv[])
signal (SIGTSTP, tstp_handler);
signal (SIGCONT, cont_handler);
+ /* Print the escape key if set. */
+ if (escape_key > 0)
+ print_escape_key_help ();
+
do_rescue (sock);
restore_tty ();
@@ -478,6 +494,9 @@ do_rescue (int sock)
{
size_t rlen = 0;
size_t wlen = 0;
+ struct escape_state escape_state;
+
+ init_escape_state (&escape_state);
while (sock >= 0 || rlen > 0) {
struct pollfd fds[3];
@@ -534,6 +553,13 @@ do_rescue (int sock)
}
if (n > 0)
wlen += n;
+
+ /* Process escape sequences in the tty input. If the function
+ * returns true, then we exit the loop causing virt-rescue to
+ * exit.
+ */
+ if (escape_key > 0 && process_escapes (&escape_state, wbuf, &wlen))
+ return;
}
/* Log message from appliance. */
diff --git a/rescue/rescue.h b/rescue/rescue.h
new file mode 100644
index 000000000..ccffb5eb3
--- /dev/null
+++ b/rescue/rescue.h
@@ -0,0 +1,47 @@
+/* virt-rescue
+ * Copyright (C) 2010-2017 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.
+ */
+
+#ifndef RESCUE_H
+#define RESCUE_H
+
+#include <stdbool.h>
+
+#include "guestfs.h"
+
+extern guestfs_h *g;
+extern int read_only;
+extern int live;
+extern int verbose;
+extern int keys_from_stdin;
+extern int echo_keys;
+extern const char *libvirt_uri;
+extern int inspector;
+extern int in_guestfish;
+extern int in_virt_rescue;
+extern int escape_key;
+
+/* escape.c */
+struct escape_state {
+ bool in_escape;
+};
+extern void init_escape_state (struct escape_state *state);
+extern bool process_escapes (struct escape_state *state, char *buf, size_t *len);
+extern int parse_escape_key (const char *);
+extern void print_escape_key_help (void);
+
+#endif /* RESCUE_H */
diff --git a/rescue/virt-rescue.pod b/rescue/virt-rescue.pod
index b651f84e7..bd6f954e9 100644
--- a/rescue/virt-rescue.pod
+++ b/rescue/virt-rescue.pod
@@ -128,6 +128,29 @@ not used at all.
Add all the disks from the named libvirt guest. Domain UUIDs can be
used instead of names.
+=item B<-e none>
+
+Disable the escape key.
+
+=item B<-e> KEY
+
+Set the escape key to the given key sequence. The default is C<^]>.
+To specify the escape key you can use:
+
+=over 4
+
+=item C<^x>
+
+Control key + C<x> key.
+
+=item C<none>
+
+I<-e none> means there is no escape key, escapes are disabled.
+
+=back
+
+See L</ESCAPE KEY> below for further information.
+
=item B<--format=raw|qcow2|..>
=item B<--format>
@@ -321,6 +344,57 @@ See L<bash(1)> for more details.
=back
+=head1 ESCAPE KEY
+
+Virt-rescue supports various keyboard escape sequences which are
+entered by pressing C<^]> (Control key + C<]> key).
+
+You can change the escape key using the I<-e> option on the command
+line (see above), and you can disable escapes completely using
+I<-e none>. The rest of this section assumes the default escape key.
+
+The following escapes can be used:
+
+=over 4
+
+=item C<^] ?>
+
+=item C<^] h>
+
+Prints a brief help text about escape sequences.
+
+=item C<^] i>
+
+Prints brief libguestfs inspection information for the guest. This
+only works if you used I<-i> on the virt-rescue command line.
+
+=item C<^] q>
+
+=item C<^] x>
+
+Quits virt-rescue immediately.
+
+=item C<^] s>
+
+Synchronize the filesystems (sync).
+
+=item C<^] u>
+
+Unmounts all the filesystems, except for the root (appliance)
+filesystems.
+
+=item C<^] z>
+
+Suspend virt-rescue (like pressing C<^Z> except that it affects
+virt-rescue rather than the program inside the rescue shell).
+
+=item C<^] ^]>
+
+Sends the literal character C<^]> (ASCII 0x1d) through to the rescue
+shell.
+
+=back
+
=head1 CAPTURING CORE DUMPS
If you are testing a tool inside virt-rescue and the tool (B<not>
--
2.13.2

View file

@ -1,397 +0,0 @@
From 00adeb472c65e30fd2e55599b14d9b2eec2a873d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 4 Mar 2017 15:35:09 +0000
Subject: [PATCH 07/10] rescue: Move --suggest code to separate file.
Just code motion.
(cherry picked from commit 5ea17e97e4413c3db4449ded72b9677cce09444f)
---
rescue/Makefile.am | 3 +-
rescue/rescue.c | 144 -------------------------------------------
rescue/rescue.h | 5 ++
rescue/suggest.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 182 insertions(+), 145 deletions(-)
create mode 100644 rescue/suggest.c
diff --git a/rescue/Makefile.am b/rescue/Makefile.am
index eb60bafa4..d478c8e3d 100644
--- a/rescue/Makefile.am
+++ b/rescue/Makefile.am
@@ -28,7 +28,8 @@ bin_PROGRAMS = virt-rescue
virt_rescue_SOURCES = \
escape.c \
rescue.c \
- rescue.h
+ rescue.h \
+ suggest.c
virt_rescue_CPPFLAGS = \
-DGUESTFS_WARN_DEPRECATED=1 \
diff --git a/rescue/rescue.c b/rescue/rescue.c
index 5281b1161..a1aac53e4 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -55,7 +55,6 @@ static void restore_tty (void);
static void tstp_handler (int sig);
static void cont_handler (int sig);
static void add_scratch_disks (int n, struct drv **drvs);
-static void do_suggestion (struct drv *drvs);
/* Currently open libguestfs handle. */
guestfs_h *g;
@@ -654,149 +653,6 @@ cont_handler (int sig)
raw_tty ();
}
-static void suggest_filesystems (void);
-
-static int
-compare_keys_len (const void *p1, const void *p2)
-{
- const char *key1 = * (char * const *) p1;
- const char *key2 = * (char * const *) p2;
- return strlen (key1) - strlen (key2);
-}
-
-/* virt-rescue --suggest flag does a kind of inspection on the
- * drives and suggests mount commands that you should use.
- */
-static void
-do_suggestion (struct drv *drvs)
-{
- CLEANUP_FREE_STRING_LIST char **roots = NULL;
- size_t i;
-
- /* For inspection, force add_drives to add the drives read-only. */
- read_only = 1;
-
- /* Add drives. */
- add_drives (drvs);
-
- /* Free up data structures, no longer needed after this point. */
- free_drives (drvs);
-
- printf (_("Inspecting the virtual machine or disk image ...\n\n"));
- fflush (stdout);
-
- if (guestfs_launch (g) == -1)
- exit (EXIT_FAILURE);
-
- /* Don't use inspect_mount, since for virt-rescue we should allow
- * arbitrary disks and disks with more than one OS on them. Let's
- * do this using the basic API instead.
- */
- roots = guestfs_inspect_os (g);
- if (roots == NULL)
- exit (EXIT_FAILURE);
-
- if (roots[0] == NULL) {
- suggest_filesystems ();
- return;
- }
-
- printf (_("This disk contains one or more operating systems. You can use these mount\n"
- "commands in virt-rescue (at the ><rescue> prompt) to mount the filesystems.\n\n"));
-
- for (i = 0; roots[i] != NULL; ++i) {
- CLEANUP_FREE_STRING_LIST char **mps = NULL;
- CLEANUP_FREE char *type = NULL, *distro = NULL, *product_name = NULL;
- int major, minor;
- size_t j;
-
- type = guestfs_inspect_get_type (g, roots[i]);
- distro = guestfs_inspect_get_distro (g, roots[i]);
- product_name = guestfs_inspect_get_product_name (g, roots[i]);
- major = guestfs_inspect_get_major_version (g, roots[i]);
- minor = guestfs_inspect_get_minor_version (g, roots[i]);
-
- printf (_("# %s is the root of a %s operating system\n"
- "# type: %s, distro: %s, version: %d.%d\n"
- "# %s\n\n"),
- roots[i], type ? : "unknown",
- type ? : "unknown", distro ? : "unknown", major, minor,
- product_name ? : "");
-
- mps = guestfs_inspect_get_mountpoints (g, roots[i]);
- if (mps == NULL)
- exit (EXIT_FAILURE);
-
- /* Sort by key length, shortest key first, so that we end up
- * mounting the filesystems in the correct order.
- */
- qsort (mps, guestfs_int_count_strings (mps) / 2, 2 * sizeof (char *),
- compare_keys_len);
-
- for (j = 0; mps[j] != NULL; j += 2)
- printf ("mount %s /sysroot%s\n", mps[j+1], mps[j]);
-
- /* If it's Linux, print the bind-mounts and a chroot command. */
- if (type && STREQ (type, "linux")) {
- printf ("mount --rbind /dev /sysroot/dev\n");
- printf ("mount --rbind /proc /sysroot/proc\n");
- printf ("mount --rbind /sys /sysroot/sys\n");
- printf ("\n");
- printf ("cd /sysroot\n");
- printf ("chroot /sysroot\n");
- }
-
- printf ("\n");
- }
-}
-
-/* Inspection failed, so it doesn't contain any OS that we recognise.
- * However there might still be filesystems so print some suggestions
- * for those.
- */
-static void
-suggest_filesystems (void)
-{
- size_t i, count;
-
- CLEANUP_FREE_STRING_LIST char **fses = guestfs_list_filesystems (g);
- if (fses == NULL)
- exit (EXIT_FAILURE);
-
- /* Count how many are not swap or unknown. Possibly we should try
- * mounting to see which are mountable, but that has a high
- * probability of breaking.
- */
-#define TEST_MOUNTABLE(fs) STRNEQ ((fs), "swap") && STRNEQ ((fs), "unknown")
- count = 0;
- for (i = 0; fses[i] != NULL; i += 2) {
- if (TEST_MOUNTABLE (fses[i+1]))
- count++;
- }
-
- if (count == 0) {
- printf (_("This disk contains no mountable filesystems that we recognize.\n\n"
- "However you can still use virt-rescue on the disk image, to try to mount\n"
- "filesystems that are not recognized by libguestfs, or to create partitions,\n"
- "logical volumes and filesystems on a blank disk.\n"));
- return;
- }
-
- printf (_("This disk contains one or more filesystems, but we don't recognize any\n"
- "operating system. You can use these mount commands in virt-rescue (at the\n"
- "><rescue> prompt) to mount these filesystems.\n\n"));
-
- for (i = 0; fses[i] != NULL; i += 2) {
- printf (_("# %s has type '%s'\n"), fses[i], fses[i+1]);
-
- if (TEST_MOUNTABLE (fses[i+1]))
- printf ("mount %s /sysroot\n", fses[i]);
-
- printf ("\n");
- }
-#undef TEST_MOUNTABLE
-}
-
static void add_scratch_disk (struct drv **drvs);
static void
diff --git a/rescue/rescue.h b/rescue/rescue.h
index ccffb5eb3..4f5a04a71 100644
--- a/rescue/rescue.h
+++ b/rescue/rescue.h
@@ -23,6 +23,8 @@
#include "guestfs.h"
+#include "options.h"
+
extern guestfs_h *g;
extern int read_only;
extern int live;
@@ -44,4 +46,7 @@ extern bool process_escapes (struct escape_state *state, char *buf, size_t *len)
extern int parse_escape_key (const char *);
extern void print_escape_key_help (void);
+/* suggest.c */
+extern void do_suggestion (struct drv *drvs);
+
#endif /* RESCUE_H */
diff --git a/rescue/suggest.c b/rescue/suggest.c
new file mode 100644
index 000000000..13141ccc2
--- /dev/null
+++ b/rescue/suggest.c
@@ -0,0 +1,175 @@
+/* virt-rescue
+ * Copyright (C) 2010-2017 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <locale.h>
+#include <libintl.h>
+
+#include "guestfs.h"
+#include "guestfs-internal-frontend.h"
+
+#include "options.h"
+
+#include "rescue.h"
+
+static void suggest_filesystems (void);
+
+static int
+compare_keys_len (const void *p1, const void *p2)
+{
+ const char *key1 = * (char * const *) p1;
+ const char *key2 = * (char * const *) p2;
+ return strlen (key1) - strlen (key2);
+}
+
+/* virt-rescue --suggest flag does a kind of inspection on the
+ * drives and suggests mount commands that you should use.
+ */
+void
+do_suggestion (struct drv *drvs)
+{
+ CLEANUP_FREE_STRING_LIST char **roots = NULL;
+ size_t i;
+
+ /* For inspection, force add_drives to add the drives read-only. */
+ read_only = 1;
+
+ /* Add drives. */
+ add_drives (drvs);
+
+ /* Free up data structures, no longer needed after this point. */
+ free_drives (drvs);
+
+ printf (_("Inspecting the virtual machine or disk image ...\n\n"));
+ fflush (stdout);
+
+ if (guestfs_launch (g) == -1)
+ exit (EXIT_FAILURE);
+
+ /* Don't use inspect_mount, since for virt-rescue we should allow
+ * arbitrary disks and disks with more than one OS on them. Let's
+ * do this using the basic API instead.
+ */
+ roots = guestfs_inspect_os (g);
+ if (roots == NULL)
+ exit (EXIT_FAILURE);
+
+ if (roots[0] == NULL) {
+ suggest_filesystems ();
+ return;
+ }
+
+ printf (_("This disk contains one or more operating systems. You can use these mount\n"
+ "commands in virt-rescue (at the ><rescue> prompt) to mount the filesystems.\n\n"));
+
+ for (i = 0; roots[i] != NULL; ++i) {
+ CLEANUP_FREE_STRING_LIST char **mps = NULL;
+ CLEANUP_FREE char *type = NULL, *distro = NULL, *product_name = NULL;
+ int major, minor;
+ size_t j;
+
+ type = guestfs_inspect_get_type (g, roots[i]);
+ distro = guestfs_inspect_get_distro (g, roots[i]);
+ product_name = guestfs_inspect_get_product_name (g, roots[i]);
+ major = guestfs_inspect_get_major_version (g, roots[i]);
+ minor = guestfs_inspect_get_minor_version (g, roots[i]);
+
+ printf (_("# %s is the root of a %s operating system\n"
+ "# type: %s, distro: %s, version: %d.%d\n"
+ "# %s\n\n"),
+ roots[i], type ? : "unknown",
+ type ? : "unknown", distro ? : "unknown", major, minor,
+ product_name ? : "");
+
+ mps = guestfs_inspect_get_mountpoints (g, roots[i]);
+ if (mps == NULL)
+ exit (EXIT_FAILURE);
+
+ /* Sort by key length, shortest key first, so that we end up
+ * mounting the filesystems in the correct order.
+ */
+ qsort (mps, guestfs_int_count_strings (mps) / 2, 2 * sizeof (char *),
+ compare_keys_len);
+
+ for (j = 0; mps[j] != NULL; j += 2)
+ printf ("mount %s /sysroot%s\n", mps[j+1], mps[j]);
+
+ /* If it's Linux, print the bind-mounts and a chroot command. */
+ if (type && STREQ (type, "linux")) {
+ printf ("mount --rbind /dev /sysroot/dev\n");
+ printf ("mount --rbind /proc /sysroot/proc\n");
+ printf ("mount --rbind /sys /sysroot/sys\n");
+ printf ("\n");
+ printf ("cd /sysroot\n");
+ printf ("chroot /sysroot\n");
+ }
+
+ printf ("\n");
+ }
+}
+
+/* Inspection failed, so it doesn't contain any OS that we recognise.
+ * However there might still be filesystems so print some suggestions
+ * for those.
+ */
+static void
+suggest_filesystems (void)
+{
+ size_t i, count;
+
+ CLEANUP_FREE_STRING_LIST char **fses = guestfs_list_filesystems (g);
+ if (fses == NULL)
+ exit (EXIT_FAILURE);
+
+ /* Count how many are not swap or unknown. Possibly we should try
+ * mounting to see which are mountable, but that has a high
+ * probability of breaking.
+ */
+#define TEST_MOUNTABLE(fs) STRNEQ ((fs), "swap") && STRNEQ ((fs), "unknown")
+ count = 0;
+ for (i = 0; fses[i] != NULL; i += 2) {
+ if (TEST_MOUNTABLE (fses[i+1]))
+ count++;
+ }
+
+ if (count == 0) {
+ printf (_("This disk contains no mountable filesystems that we recognize.\n\n"
+ "However you can still use virt-rescue on the disk image, to try to mount\n"
+ "filesystems that are not recognized by libguestfs, or to create partitions,\n"
+ "logical volumes and filesystems on a blank disk.\n"));
+ return;
+ }
+
+ printf (_("This disk contains one or more filesystems, but we don't recognize any\n"
+ "operating system. You can use these mount commands in virt-rescue (at the\n"
+ "><rescue> prompt) to mount these filesystems.\n\n"));
+
+ for (i = 0; fses[i] != NULL; i += 2) {
+ printf (_("# %s has type '%s'\n"), fses[i], fses[i+1]);
+
+ if (TEST_MOUNTABLE (fses[i+1]))
+ printf ("mount %s /sysroot\n", fses[i]);
+
+ printf ("\n");
+ }
+#undef TEST_MOUNTABLE
+}
--
2.13.2

View file

@ -1,35 +0,0 @@
From 35f96f0b0c9a3f05b16160338b1a118e2e7862ea Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Mar 2017 22:51:06 +0000
Subject: [PATCH 08/10] rescue: docs: It is no longer necessary to mount
filesystems by hand.
Fix the manual page to reflect the new -i option.
Fixes commit 33d2ae796119ae5dd38e2afcbf1ba4216bd99846.
(cherry picked from commit c38b48409e067ba973d02bb10273350aa31b558e)
---
rescue/virt-rescue.pod | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/rescue/virt-rescue.pod b/rescue/virt-rescue.pod
index bd6f954e9..dfa74e204 100644
--- a/rescue/virt-rescue.pod
+++ b/rescue/virt-rescue.pod
@@ -35,9 +35,9 @@ For live VMs you I<must> use the I<--ro> option.
When you run virt-rescue on a virtual machine or disk image, you are
placed in an interactive bash shell where you can use many ordinary
Linux commands. What you see in F</> (F</bin>, F</lib> etc) is the
-rescue appliance. You must mount the virtual machine's filesystems by
-hand. There is an empty directory called F</sysroot> where you can
-mount filesystems.
+rescue appliance. You must mount the virtual machine's filesystems.
+There is an empty directory called F</sysroot> where you can mount
+filesystems.
To automatically mount the virtual machine's filesystems under
F</sysroot> use the I<-i> option. This uses libguestfs inspection to
--
2.13.2

View file

@ -1,28 +0,0 @@
From bcbb71f280a1c8b9dee6d63ddd75d727d3c73d69 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Fri, 24 Mar 2017 22:52:02 +0000
Subject: [PATCH 09/10] rescue: docs: Note that you can run virt-rescue on
disks too.
(cherry picked from commit 267569f7ad22ad14d9ef4fa27b038469ae115c45)
---
rescue/virt-rescue.pod | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rescue/virt-rescue.pod b/rescue/virt-rescue.pod
index dfa74e204..5cfbd6e1c 100644
--- a/rescue/virt-rescue.pod
+++ b/rescue/virt-rescue.pod
@@ -69,7 +69,8 @@ Virt-rescue can be used on I<any> disk image file or device, not just
a virtual machine. For example you can use it on a blank file if you
want to partition that file (although we would recommend using
L<guestfish(1)> instead as it is more suitable for this purpose). You
-can even use virt-rescue on things like SD cards.
+can even use virt-rescue on things like USB drives, SD cards and hard
+disks.
You can get virt-rescue to give you scratch disk(s) to play with.
This is useful for testing out Linux utilities (see I<--scratch>).
--
2.13.2

View file

@ -1,42 +0,0 @@
From 495ac58e2af309443f59819403e4cb5780ae721c Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Sat, 25 Mar 2017 23:34:09 +0000
Subject: [PATCH 10/10] rescue: Don't document --suggest option in --help
output.
Also fix the docs test to ignore it.
Updates/fixes commit 33d2ae796119ae5dd38e2afcbf1ba4216bd99846.
(cherry picked from commit aa7b7e26c3aa434f2b299055df63c52fb3a2f93f)
---
rescue/rescue.c | 1 -
rescue/test-virt-rescue-docs.sh | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rescue/rescue.c b/rescue/rescue.c
index a1aac53e4..6f9dcd733 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -101,7 +101,6 @@ usage (int status)
" --scratch[=N] Add scratch disk(s)\n"
" --selinux For backwards compat only, does nothing\n"
" --smp N Enable SMP with N >= 2 virtual CPUs\n"
- " --suggest Suggest mount commands for this guest\n"
" -v|--verbose Verbose messages\n"
" -V|--version Display version and exit\n"
" -w|--rw Mount read-write\n"
diff --git a/rescue/test-virt-rescue-docs.sh b/rescue/test-virt-rescue-docs.sh
index 25f8f6095..e5fbf26f4 100755
--- a/rescue/test-virt-rescue-docs.sh
+++ b/rescue/test-virt-rescue-docs.sh
@@ -21,4 +21,5 @@ set -e
$TEST_FUNCTIONS
skip_if_skipped
-$top_srcdir/podcheck.pl virt-rescue.pod virt-rescue
+$top_srcdir/podcheck.pl virt-rescue.pod virt-rescue \
+ --ignore=--suggest
--
2.13.2

View file

@ -8,8 +8,7 @@ list:
http://www.redhat.com/mailman/listinfo/libguestfs
This Fedora package comes with a lot of help and examples to get you
started.
This package comes with a lot of help and examples to get you started.
The first place to start are the manual pages. Type:
@ -20,19 +19,19 @@ The first place to start are the manual pages. Type:
man virt-cat # and other virt-* tools
If you install the libguestfs-devel package, then in the
/usr/share/doc/libguestfs-devel/ directory you will also
find:
/usr/share/doc/libguestfs-devel/ directory you will find other
documentation including:
- BUGS: list of open bugs in this version
- ChangeLog: the detailed list of changes in this version
- ChangeLog.gz: the detailed list of changes in this version
- ROADMAP: the roadmap for future versions
- HACKING: how to extend libguestfs
- TODO: ideas for extending libguestfs
- *.c: example C programs using the API
- *.xml: example virt-inspector output
- *.xml.gz: example virt-inspector output (compressed)
- *.rng: virt-inspector RelaxNG schema
- virt-inspector.rng: virt-inspector RelaxNG schema

View file

@ -1,10 +0,0 @@
#!/bin/sh -
set -e
rpmdev-bumpspec -c "- Bump and rebuild." libguestfs.spec
git diff ||:
echo "Press ENTER to commit, push and rebuild."
read line
fedpkg commit -m "Bump and rebuild." -p
fedpkg build

56
copy-patches.sh Executable file
View file

@ -0,0 +1,56 @@
#!/bin/bash -
set -e
# Maintainer script to copy patches from the git repo to the current
# directory. It's normally only used downstream (ie. in RHEL). Use
# it like this:
# ./copy-patches.sh
rhel_version=9.0.0
# Check we're in the right directory.
if [ ! -f libguestfs.spec ]; then
echo "$0: run this from the directory containing 'libguestfs.spec'"
exit 1
fi
git_checkout=$HOME/d/libguestfs-rhel-$rhel_version
if [ ! -d $git_checkout ]; then
echo "$0: $git_checkout does not exist"
echo "This script is only for use by the maintainer when preparing a"
echo "libguestfs release on RHEL."
exit 1
fi
# Get the base version of libguestfs.
version=`grep '^Version:' libguestfs.spec | awk '{print $2}'`
tag="v$version"
# Remove any existing patches.
git rm -f [0-9]*.patch ||:
rm -f [0-9]*.patch
# Get the patches.
(cd $git_checkout; rm -f [0-9]*.patch; git format-patch -N --submodule=diff $tag)
mv $git_checkout/[0-9]*.patch .
# Remove any not to be applied.
rm -f *NOT-FOR-RPM*.patch
# Add the patches.
git add [0-9]*.patch
# Print out the patch lines.
echo
echo "--- Copy the following text into libguestfs.spec file"
echo
echo "# Patches."
for f in [0-9]*.patch; do
n=`echo $f | awk -F- '{print $1}'`
echo "Patch$n: $f"
done
echo
echo "--- End of text"

6
gating.yaml Executable file
View file

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-*
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: xen-ci.brew-build.tier1.functional}

File diff suppressed because it is too large Load diff

5
rpminspect.yaml Normal file
View file

@ -0,0 +1,5 @@
# Ignore copy-patches.sh. It is an internal script we use to
# manage the patches.
upstream:
ignore:
- copy-patches.sh

View file

@ -1,2 +1,2 @@
SHA512 (libguestfs-1.36.13.tar.gz) = 7c9799d5d563ffd8296f70a8402582aba85f3bf3c0dcaa18c44ecff5b7f771a3bc3f297aa85a4056351758298c79752d456a4b46e41924ff9acf196c992d51fb
SHA512 (libguestfs-1.36.13.tar.gz.sig) = 50bf6282d9c10d7ad455b6a8986c9ada71e886b10c971042c04a8abac50d8d78e5e8a701f1c55188ed0130e82c240141e5dde7094267198b8d5231b35c1beb49
SHA512 (libguestfs-1.58.0.tar.gz) = 67abbd37fe64935ae5cca13dbe1860fe2eab9df492fd134eacbdc1831e6034c849855e76118ce0002d3ac83205122947582dbe47b66f12b94dcb51155881501a
SHA512 (libguestfs-1.58.0.tar.gz.sig) = e07758ed3901f9ae95dace16cbb4de194dbbde788155efcde7982226785928d1805af6939f201d74770923ad55997f1d465f9594cb81bc2435c0ea882ce546d8

View file

@ -0,0 +1,10 @@
#!/bin/bash -
set -e
set -x
# This only makes sure that libguestfs isn't totally broken.
# Fix libvirt.
systemctl restart virtqemud virtsecretd virtstoraged virtnetworkd
libguestfs-test-tool

14
tests/tests.yml Normal file
View file

@ -0,0 +1,14 @@
# https://fedoraproject.org/wiki/CI/Tests
# https://fedoraproject.org/wiki/CI/Standard_Test_Roles
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- libguestfs
- libvirt-daemon-kvm
tests:
- libguestfs-test-tool:
dir: .
run: ./run-libguestfs-test-tool.sh

View file

@ -7,6 +7,7 @@ obsoletes=1
gpgcheck=0
assumeyes=1
reposdir=/dev/null
modulesdir=@PWD@/modules
[local]
name=local