import libguestfs-1.54.0-1.el10

i10cs changed/i10cs/libguestfs-1.54.0-1.el10
MSVSphere Packaging Team 2 months ago
commit e8363f64d1
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

2
.gitignore vendored

@ -0,0 +1,2 @@
SOURCES/libguestfs-1.54.0.tar.gz
SOURCES/libguestfs.keyring

@ -0,0 +1,2 @@
219ca9ffccfb7c6377f50343aeef1b955bbf1961 SOURCES/libguestfs-1.54.0.tar.gz
1bbc40f501a7fef9eef2a39b701a71aee2fea7c4 SOURCES/libguestfs.keyring

@ -0,0 +1,28 @@
From 0edaea8f91bf08025651eeff32f53b9335003842 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 8 Oct 2024 14:53:38 +0100
Subject: [PATCH] website: Add links for 1.54 and 1.55 download locations
---
website/index.html.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/website/index.html.in b/website/index.html.in
index a61fca924..2a0d32217 100644
--- a/website/index.html.in
+++ b/website/index.html.in
@@ -186,9 +186,10 @@ git clone <a href="https://github.com/libguestfs/libguestfs">https://github.com/
LATEST-URL: http://libguestfs.org/download/1.53-development/libguestfs-@PACKAGE_VERSION@.tar.gz
LATEST-VERSION: @PACKAGE_VERSION@
-->
- <a href="download/1.53-development/">Latest development version: <strong>@PACKAGE_VERSION@</strong></a> (released <strong>@RELEASE_DATE@</strong>).<br/>
+ <a href="download/1.55-development/">Latest development version: <strong>@PACKAGE_VERSION@</strong></a> (released <strong>@RELEASE_DATE@</strong>).<br/>
Stable branch:
<strong>
+ <a href="download/1.54-stable/">1.54.x</a>,
<a href="download/1.52-stable/">1.52.x</a>,
<a href="download/1.50-stable/">1.50.x</a>,
<a href="download/1.48-stable/">1.48.x</a>
--
2.43.0

@ -0,0 +1,556 @@
From 2f798c87910e0fe65247a0695855ba7c6338bb71 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 29 Jul 2013 14:47:56 +0100
Subject: [PATCH] RHEL: Disable unsupported remote drive protocols
(RHBZ#962113).
This disables support for unsupported remote drive protocols:
* ftp
* ftps
* http
* https
* iscsi
* ssh
Note 'nbd' is not disabled, and of course 'file' works.
---
docs/guestfs-testing.pod | 20 -----
fish/guestfish.pod | 42 ++-------
fish/test-add-uri.sh | 21 -----
generator/actions_core.ml | 34 +-------
lib/drives.c | 113 -------------------------
lib/guestfs.pod | 67 ---------------
tests/disks/test-qemu-drive-libvirt.sh | 7 --
tests/disks/test-qemu-drive.sh | 40 ---------
8 files changed, 8 insertions(+), 336 deletions(-)
diff --git a/docs/guestfs-testing.pod b/docs/guestfs-testing.pod
index f5c09df6e..ee4b26d6b 100644
--- a/docs/guestfs-testing.pod
+++ b/docs/guestfs-testing.pod
@@ -109,26 +109,6 @@ image. To exit, type C<exit>.
If you get an error, try enabling debugging (add C<-v> to the command
line). Also make sure that L<libguestfs-test-tool(1)> succeeds.
-=head2 Try to open a remote guest image with guestfish.
-
-You may also have to disable libvirt by setting this:
-
- export LIBGUESTFS_BACKEND=direct
-
-If you have a disk image available over HTTP/FTP, try to open it.
-
- guestfish --ro -i --format=raw -a http://www.example.com/disk.img
-
-For SSH you will need to make sure that ssh-agent is set up so you
-don't need a password to log in to the remote machine. Then a command
-similar to this should work:
-
- guestfish --ro -i --format=raw \
- -a ssh://remote.example.com/path/to/disk.img
-
-If you get an error, try enabling debugging (add C<-v> to the command
-line). Also make sure that L<libguestfs-test-tool(1)> succeeds.
-
=head2 Run virt-alignment-scan on all your guests.
Run L<virt-alignment-scan(1)> on guests or disk images:
diff --git a/fish/guestfish.pod b/fish/guestfish.pod
index da47c86d6..33fc8b2c8 100644
--- a/fish/guestfish.pod
+++ b/fish/guestfish.pod
@@ -131,9 +131,9 @@ To list what is available do:
=head2 Remote drives
-Access a remote disk using ssh:
+Access a remote disk using NBD:
- guestfish -a ssh://example.com/path/to/disk.img
+ guestfish -a nbd://example.com
=head2 Remote control
@@ -1129,12 +1129,12 @@ L<guestfs(3)/REMOTE STORAGE>>.
On the command line, you can use the I<-a> option to add network
block devices using a URI-style format, for example:
- guestfish -a ssh://root@example.com/disk.img
+ guestfish -a nbd://example.com
URIs I<cannot> be used with the L</add> command. The equivalent
command using the API directly is:
- ><fs> add /disk.img protocol:ssh server:tcp:example.com username:root
+ ><fs> add /disk.img protocol:nbd server:tcp:example.com
The possible I<-a URI> formats are described below.
@@ -1144,28 +1144,6 @@ The possible I<-a URI> formats are described below.
Add the local disk image (or device) called F<disk.img>.
-=head2 B<-a ftp://[user@]example.com[:port]/disk.img>
-
-=head2 B<-a ftps://[user@]example.com[:port]/disk.img>
-
-=head2 B<-a http://[user@]example.com[:port]/disk.img>
-
-=head2 B<-a https://[user@]example.com[:port]/disk.img>
-
-Add a disk located on a remote FTP or HTTP server.
-
-The equivalent API command would be:
-
- ><fs> add /disk.img protocol:(ftp|...) server:tcp:example.com
-
-=head2 B<-a iscsi://example.com[:port]/target-iqn-name[/lun]>
-
-Add a disk located on an iSCSI server.
-
-The equivalent API command would be:
-
- ><fs> add target-iqn-name/lun protocol:iscsi server:tcp:example.com
-
=head2 B<-a nbd://example.com[:port]>
=head2 B<-a nbd://example.com[:port]/exportname>
@@ -1200,23 +1178,13 @@ The equivalent API command would be:
><fs> add pool/disk protocol:rbd server:tcp:example.com:port
-=head2 B<-a ssh://[user@]example.com[:port]/disk.img>
-
-Add a disk image located on a remote server, accessed using the Secure
-Shell (ssh) SFTP protocol. SFTP is supported out of the box by all
-major SSH servers.
-
-The equivalent API command would be:
-
- ><fs> add /disk protocol:ssh server:tcp:example.com [username:user]
-
Note that the URIs follow the syntax of
L<RFC 3986|https://tools.ietf.org/html/rfc3986>: in particular, there
are restrictions on the allowed characters for the various components
of the URI. Characters such as C<:>, C<@>, and C</> B<must> be
percent-encoded:
- $ guestfish -a ssh://user:pass%40word@example.com/disk.img
+ $ guestfish -a rbd://user:pass%40word@example.com[:port]/pool/disk
In this case, the password is C<pass@word>.
diff --git a/fish/test-add-uri.sh b/fish/test-add-uri.sh
index 533a3ce0c..ddabeb639 100755
--- a/fish/test-add-uri.sh
+++ b/fish/test-add-uri.sh
@@ -40,10 +40,6 @@ function fail ()
$VG guestfish -x -a file://$abs_builddir/test-add-uri.img </dev/null >test-add-uri.out 2>&1
grep -sq 'add_drive ".*/test-add-uri.img"' test-add-uri.out || fail
-# curl
-$VG guestfish -x -a ftp://user@example.com/disk.img </dev/null >test-add-uri.out 2>&1
-grep -sq 'add_drive "/disk.img" "protocol:ftp" "server:tcp:example.com" "username:user"' test-add-uri.out || fail
-
# NBD
$VG guestfish -x -a nbd://example.com </dev/null >test-add-uri.out 2>&1
grep -sq 'add_drive "" "protocol:nbd" "server:tcp:example.com"' test-add-uri.out || fail
@@ -63,22 +59,5 @@ grep -sq 'add_drive "pool/disk" "protocol:rbd" "server:tcp:example.com:6789"' te
$VG guestfish -x -a rbd:///pool/disk </dev/null >test-add-uri.out 2>&1
grep -sq 'add_drive "pool/disk" "protocol:rbd"' test-add-uri.out || fail
-# ssh
-$VG guestfish -x -a ssh://example.com/disk.img </dev/null >test-add-uri.out 2>&1
-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com"' test-add-uri.out || fail
-
-$VG guestfish -x -a ssh://user@example.com/disk.img </dev/null >test-add-uri.out 2>&1
-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com" "username:user"' test-add-uri.out || fail
-
-$VG guestfish -x -a ssh://user@example.com:2000/disk.img </dev/null >test-add-uri.out 2>&1
-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com:2000" "username:user"' test-add-uri.out || fail
-
-# iSCSI
-$VG guestfish -x -a iscsi://example.com/iqn.2015-12.com.libguestfs:test1/0 </dev/null >test-add-uri.out 2>&1
-grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test1/0" "protocol:iscsi" "server:tcp:example.com"' test-add-uri.out || fail
-
-$VG guestfish -x -a iscsi://user:password@example.com/iqn.2015-12.com.libguestfs:test2/0 </dev/null >test-add-uri.out 2>&1
-grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test2/0" "protocol:iscsi" "server:tcp:example.com" "username:user" "secret:password"' test-add-uri.out || fail
-
rm test-add-uri.out
rm test-add-uri.img
diff --git a/generator/actions_core.ml b/generator/actions_core.ml
index 20f6e8436..768f58433 100644
--- a/generator/actions_core.ml
+++ b/generator/actions_core.ml
@@ -350,22 +350,6 @@ F<filename> is interpreted as a local file or device.
This is the default if the optional protocol parameter
is omitted.
-=item C<protocol = \"ftp\"|\"ftps\"|\"http\"|\"https\">
-
-Connect to a remote FTP or HTTP server.
-The C<server> parameter must also be supplied - see below.
-
-See also: L<guestfs(3)/FTP AND HTTP>
-
-=item C<protocol = \"iscsi\">
-
-Connect to the iSCSI server.
-The C<server> parameter must also be supplied - see below.
-The C<username> parameter may be supplied. See below.
-The C<secret> parameter may be supplied. See below.
-
-See also: L<guestfs(3)/ISCSI>.
-
=item C<protocol = \"nbd\">
Connect to the Network Block Device server.
@@ -382,15 +366,6 @@ The C<secret> parameter may be supplied. See below.
See also: L<guestfs(3)/CEPH>.
-=item C<protocol = \"ssh\">
-
-Connect to the Secure Shell (ssh) server.
-
-The C<server> parameter must be supplied.
-The C<username> parameter may be supplied. See below.
-
-See also: L<guestfs(3)/SSH>.
-
=back
=item C<server>
@@ -401,11 +376,8 @@ is a list of server(s).
Protocol Number of servers required
-------- --------------------------
file List must be empty or param not used at all
- ftp|ftps|http|https Exactly one
- iscsi Exactly one
nbd Exactly one
rbd Zero or more
- ssh Exactly one
Each list element is a string specifying a server. The string must be
in one of the following formats:
@@ -421,10 +393,10 @@ for the protocol is used (see F</etc/services>).
=item C<username>
-For the C<ftp>, C<ftps>, C<http>, C<https>, C<iscsi>, C<rbd> and C<ssh>
-protocols, this specifies the remote username.
+For the C<rbd>
+protocol, this specifies the remote username.
-If not given, then the local username is used for C<ssh>, and no authentication
+If not given, then no authentication
is attempted for ceph. But note this sometimes may give unexpected results, for
example if using the libvirt backend and if the libvirt backend is configured to
start the qemu appliance as a special user such as C<qemu.qemu>. If in doubt,
diff --git a/lib/drives.c b/lib/drives.c
index c068b8ecb..6e4453ce5 100644
--- a/lib/drives.c
+++ b/lib/drives.c
@@ -166,34 +166,6 @@ create_drive_non_file (guestfs_h *g,
return drv;
}
-static struct drive *
-create_drive_curl (guestfs_h *g,
- const struct drive_create_data *data)
-{
- if (data->nr_servers != 1) {
- error (g, _("curl: you must specify exactly one server"));
- return NULL;
- }
-
- if (data->servers[0].transport != drive_transport_none &&
- data->servers[0].transport != drive_transport_tcp) {
- error (g, _("curl: only tcp transport is supported"));
- return NULL;
- }
-
- if (STREQ (data->exportname, "")) {
- error (g, _("curl: pathname should not be an empty string"));
- return NULL;
- }
-
- if (data->exportname[0] != '/') {
- error (g, _("curl: pathname must begin with a '/'"));
- return NULL;
- }
-
- return create_drive_non_file (g, data);
-}
-
static int
nbd_port (void)
{
@@ -261,67 +233,6 @@ create_drive_rbd (guestfs_h *g,
return create_drive_non_file (g, data);
}
-static struct drive *
-create_drive_ssh (guestfs_h *g,
- const struct drive_create_data *data)
-{
- if (data->nr_servers != 1) {
- error (g, _("ssh: you must specify exactly one server"));
- return NULL;
- }
-
- if (data->servers[0].transport != drive_transport_none &&
- data->servers[0].transport != drive_transport_tcp) {
- error (g, _("ssh: only tcp transport is supported"));
- return NULL;
- }
-
- if (STREQ (data->exportname, "")) {
- error (g, _("ssh: pathname should not be an empty string"));
- return NULL;
- }
-
- if (data->exportname[0] != '/') {
- error (g, _("ssh: pathname must begin with a '/'"));
- return NULL;
- }
-
- if (data->username && STREQ (data->username, "")) {
- error (g, _("ssh: username should not be an empty string"));
- return NULL;
- }
-
- return create_drive_non_file (g, data);
-}
-
-static struct drive *
-create_drive_iscsi (guestfs_h *g,
- const struct drive_create_data *data)
-{
- if (data->nr_servers != 1) {
- error (g, _("iscsi: you must specify exactly one server"));
- return NULL;
- }
-
- if (data->servers[0].transport != drive_transport_none &&
- data->servers[0].transport != drive_transport_tcp) {
- error (g, _("iscsi: only tcp transport is supported"));
- return NULL;
- }
-
- if (STREQ (data->exportname, "")) {
- error (g, _("iscsi: target name should not be an empty string"));
- return NULL;
- }
-
- if (data->exportname[0] == '/') {
- error (g, _("iscsi: target string must not begin with a '/'"));
- return NULL;
- }
-
- return create_drive_non_file (g, data);
-}
-
/**
* Create the special F</dev/null> drive.
*
@@ -768,26 +679,6 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
drv = create_drive_file (g, &data);
}
}
- else if (STREQ (protocol, "ftp")) {
- data.protocol = drive_protocol_ftp;
- drv = create_drive_curl (g, &data);
- }
- else if (STREQ (protocol, "ftps")) {
- data.protocol = drive_protocol_ftps;
- drv = create_drive_curl (g, &data);
- }
- else if (STREQ (protocol, "http")) {
- data.protocol = drive_protocol_http;
- drv = create_drive_curl (g, &data);
- }
- else if (STREQ (protocol, "https")) {
- data.protocol = drive_protocol_https;
- drv = create_drive_curl (g, &data);
- }
- else if (STREQ (protocol, "iscsi")) {
- data.protocol = drive_protocol_iscsi;
- drv = create_drive_iscsi (g, &data);
- }
else if (STREQ (protocol, "nbd")) {
data.protocol = drive_protocol_nbd;
drv = create_drive_nbd (g, &data);
@@ -796,10 +687,6 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
data.protocol = drive_protocol_rbd;
drv = create_drive_rbd (g, &data);
}
- else if (STREQ (protocol, "ssh")) {
- data.protocol = drive_protocol_ssh;
- drv = create_drive_ssh (g, &data);
- }
else {
error (g, _("unknown protocol %s"), protocol);
drv = NULL; /*FALLTHROUGH*/
diff --git a/lib/guestfs.pod b/lib/guestfs.pod
index ecab0e1f3..dff32cc9e 100644
--- a/lib/guestfs.pod
+++ b/lib/guestfs.pod
@@ -723,51 +723,6 @@ a qcow2 backing file specification, libvirt does not construct an
ephemeral secret object from those, for Ceph authentication. Refer to
L<https://bugzilla.redhat.com/2033247>.
-=head3 FTP AND HTTP
-
-Libguestfs can access remote disks over FTP, FTPS, HTTP or HTTPS
-protocols.
-
-To do this, set the optional C<protocol> and C<server> parameters of
-L</guestfs_add_drive_opts> like this:
-
- char **servers = { "www.example.org", NULL };
- guestfs_add_drive_opts (g, "/disk.img",
- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "http",
- GUESTFS_ADD_DRIVE_OPTS_SERVER, servers,
- -1);
-
-The C<protocol> can be one of C<"ftp">, C<"ftps">, C<"http">,
-or C<"https">.
-
-C<servers> (the C<server> parameter) is a list which must have a
-single element. The single element is a string defining the web
-or FTP server. The format of this string is documented in
-L</guestfs_add_drive_opts>.
-
-=head3 GLUSTER
-
-Glusterfs support was removed in libguestfs 1.54 (2024).
-
-=head3 ISCSI
-
-Libguestfs can access iSCSI disks remotely.
-
-To do this, set the optional C<protocol> and C<server> parameters like
-this:
-
- char **server = { "iscsi.example.org:3000", NULL };
- guestfs_add_drive_opts (g, "target-iqn-name/lun",
- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "iscsi",
- GUESTFS_ADD_DRIVE_OPTS_SERVER, server,
- -1);
-
-The C<server> parameter is a list which must have a single element.
-The single element is a string defining the iSCSI server. The format
-of this string is documented in L</guestfs_add_drive_opts>.
-
=head3 NETWORK BLOCK DEVICE
Libguestfs can access Network Block Device (NBD) disks remotely.
@@ -830,28 +785,6 @@ L<https://bugs.launchpad.net/qemu/+bug/1155677>
=back
-=head3 SHEEPDOG
-
-Sheepdog support was removed in libguestfs 1.54 (2024).
-
-=head3 SSH
-
-Libguestfs can access disks over a Secure Shell (SSH) connection.
-
-To do this, set the C<protocol> and C<server> and (optionally)
-C<username> parameters of L</guestfs_add_drive_opts> like this:
-
- char **server = { "remote.example.com", NULL };
- guestfs_add_drive_opts (g, "/path/to/disk.img",
- GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
- GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "ssh",
- GUESTFS_ADD_DRIVE_OPTS_SERVER, server,
- GUESTFS_ADD_DRIVE_OPTS_USERNAME, "remoteuser",
- -1);
-
-The format of the server string is documented in
-L</guestfs_add_drive_opts>.
-
=head2 INSPECTION
Libguestfs has APIs for inspecting an unknown disk image to find out
diff --git a/tests/disks/test-qemu-drive-libvirt.sh b/tests/disks/test-qemu-drive-libvirt.sh
index afbeddec6..93df4be0a 100755
--- a/tests/disks/test-qemu-drive-libvirt.sh
+++ b/tests/disks/test-qemu-drive-libvirt.sh
@@ -65,13 +65,6 @@ check_output
grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail ceph2
rm "$DEBUG_QEMU_FILE"
-# iSCSI.
-
-$guestfish -d iscsi run ||:
-check_output
-grep -sq -- '-drive file=iscsi://1.2.3.4:1234/iqn.2003-01.org.linux-iscsi.fedora' "$DEBUG_QEMU_FILE" || fail iscsi
-rm "$DEBUG_QEMU_FILE"
-
# NBD.
$guestfish -d nbd run ||:
diff --git a/tests/disks/test-qemu-drive.sh b/tests/disks/test-qemu-drive.sh
index 9ee7df389..b3e4f9903 100755
--- a/tests/disks/test-qemu-drive.sh
+++ b/tests/disks/test-qemu-drive.sh
@@ -62,35 +62,6 @@ check_output
grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail
rm "$DEBUG_QEMU_FILE"
-# HTTP.
-
-guestfish <<EOF ||:
- add "/disk.img" "format:raw" "protocol:http" "server:www.example.com"
- run
-EOF
-check_output
-grep -sq -- '-drive file=http://www.example.com/disk.img,' "$DEBUG_QEMU_FILE" || fail
-rm "$DEBUG_QEMU_FILE"
-
-# iSCSI.
-
-guestfish <<EOF ||:
- add "target-iqn-name/lun" "format:raw" "protocol:iscsi" "server:www.example.com:3000"
- run
-EOF
-check_output
-grep -sq -- '-drive file=iscsi://www.example.com:3000/target-iqn-name/lun,' "$DEBUG_QEMU_FILE" || fail
-rm "$DEBUG_QEMU_FILE"
-
-guestfish <<EOF ||:
- add "target-iqn-name/lun" "format:raw" "protocol:iscsi" "server:www.example.com:3000" \
- "username:user" "secret:pass"
- run
-EOF
-check_output
-grep -sq -- '-drive file=iscsi://user%pass@www.example.com:3000/target-iqn-name/lun,' "$DEBUG_QEMU_FILE" || fail
-rm "$DEBUG_QEMU_FILE"
-
# NBD.
guestfish <<EOF ||:
@@ -108,14 +79,3 @@ EOF
check_output
grep -sq -- '-drive file=nbd:unix:/socket,' "$DEBUG_QEMU_FILE" || fail
rm "$DEBUG_QEMU_FILE"
-
-# SSH.
-
-guestfish <<EOF ||:
- add "/disk.img" "format:raw" "protocol:ssh" "server:example.com" \
- "username:rich"
- run
-EOF
-check_output
-grep -sq -- '-drive file=ssh://rich@example.com/disk.img,' "$DEBUG_QEMU_FILE" || fail
-rm "$DEBUG_QEMU_FILE"
--
2.43.0

@ -0,0 +1,69 @@
From e9a4e3efb7c86bf732c35f2582bec671b3604c83 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 7 Jul 2015 09:28:03 -0400
Subject: [PATCH] RHEL: Reject use of libguestfs-winsupport features except for
virt-* tools (RHBZ#1240276).
Fix the tests: it doesn't let us use guestfish for arbitrary Windows
edits.
---
generator/c.ml | 16 ++++++++++++++++
test-data/phony-guests/make-windows-img.sh | 1 +
tests/charsets/test-charset-fidelity.c | 2 ++
3 files changed, 19 insertions(+)
diff --git a/generator/c.ml b/generator/c.ml
index 447059b8a..a32d959d7 100644
--- a/generator/c.ml
+++ b/generator/c.ml
@@ -1846,6 +1846,22 @@ and generate_client_actions actions () =
check_args_validity c_name style;
trace_call name c_name style;
+ (* RHEL *)
+ if name = "mount" || name = "mount_ro" || name = "mount_options" ||
+ name = "mount_vfs" then (
+ pr " if (g->program && !STRPREFIX (g->program, \"virt-\")) {\n";
+ pr " CLEANUP_FREE char *vfs_type = guestfs_vfs_type (g, mountable);\n";
+ pr " if (vfs_type && STREQ (vfs_type, \"ntfs\")) {\n";
+ pr " error (g, \"mount: unsupported filesystem type\");\n";
+ pr " if (trace_flag)\n";
+ pr " guestfs_int_trace (g, \"%%s = %%s (error)\",\n";
+ pr " \"%s\", \"-1\");\n" name;
+ pr " return %s;\n" (string_of_errcode errcode);
+ pr " }\n";
+ pr " }\n";
+ pr "\n";
+ );
+
(* Calculate the total size of all FileIn arguments to pass
* as a progress bar hint.
*)
diff --git a/test-data/phony-guests/make-windows-img.sh b/test-data/phony-guests/make-windows-img.sh
index 16debd129..1c13ddac3 100755
--- a/test-data/phony-guests/make-windows-img.sh
+++ b/test-data/phony-guests/make-windows-img.sh
@@ -37,6 +37,7 @@ fi
# Create a disk image.
guestfish <<EOF
+set-program virt-testing
sparse windows.img-t 512M
run
diff --git a/tests/charsets/test-charset-fidelity.c b/tests/charsets/test-charset-fidelity.c
index 105291dc3..5ca4f3b6d 100644
--- a/tests/charsets/test-charset-fidelity.c
+++ b/tests/charsets/test-charset-fidelity.c
@@ -96,6 +96,8 @@ main (int argc, char *argv[])
if (g == NULL)
error (EXIT_FAILURE, 0, "failed to create handle");
+ guestfs_set_program (g, "virt-testing");
+
if (guestfs_add_drive_scratch (g, 1024*1024*1024, -1) == -1)
exit (EXIT_FAILURE);
--
2.43.0

@ -0,0 +1,37 @@
Libguestfs is a set of tools and a library for accessing and modifying
guest disk images. For more information see the home page:
http://libguestfs.org/
For discussion, development, patches, etc. please use the mailing
list:
http://www.redhat.com/mailman/listinfo/libguestfs
This package comes with a lot of help and examples to get you started.
The first place to start are the manual pages. Type:
man guestfs
man guestfs-faq
man guestfs-release-notes
man guestfish
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 find other
documentation including:
- BUGS: list of open bugs in this version
- ChangeLog.gz: the detailed list of changes in this version
- HACKING: how to extend libguestfs
- TODO: ideas for extending libguestfs
- *.c: example C programs using the API
- *.xml.gz: example virt-inspector output (compressed)
- virt-inspector.rng: virt-inspector RelaxNG schema

@ -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=10.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"

@ -0,0 +1,6 @@
# Guestfish colour prompts. See PROMPT in guestfish(1).
GUESTFISH_PS1='\[\e[1;32m\]><fs>\[\e[0;31m\] '
GUESTFISH_OUTPUT='\e[0m'
GUESTFISH_RESTORE="$GUESTFISH_OUTPUT"
GUESTFISH_INIT='\e[1;34m'
export GUESTFISH_PS1 GUESTFISH_OUTPUT GUESTFISH_RESTORE GUESTFISH_INIT

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
iQJFBAABCAAvFiEE93dPsa0HSn6Mh2fqkXOPc+G3aKAFAmcFNYwRHHJpY2hAYW5u
ZXhpYS5vcmcACgkQkXOPc+G3aKAn2xAArWoo5hKyREZW+WqEv40ZDD9jRG2WNUyl
BJcEvLEtcAySv71nftVQOhxoZhcfRbanSFKCTD0O/rzf5MjDhPIi9jbeGkFDg22c
zyuSJ4vGnkUCa1dDg5hJZdhCfe/gSb5RHR8GF+QRZDVXqCZg/PO+KEFh0112htUW
1y6rc9oe2f5aSNO9wgsVCYLXGcZ80wT/JyXe/NhqJoZOvps4SlEFHcpoYdV0wzOG
1UkuPy1UteDOTLHGx5JyMqR/+mzy3O59FaIU1eAXwrtlksBfzgmMyEt7ntizk3/M
qGgaE4KK3GURZUoDNc6WS856EMaoeMy6Dd6np8rMKeDn3d0PCNcrn2+7kSiNyRP0
guM+7gwcZUnI9UOi6/vwbmmDCAgRkSPP130fKagBtK2BqQ1FyTow4mOLXkVpHrlZ
zF2lDIBs/rDC1fdDXtcsZ/N4nc2OkZwvZ+jxjhsY4xnSLaZSK+C3Le7Yqj04vOzh
KfqgqorqaEw1MnqRY6czGc5VntXsK/5f+zBeS4KGn7znJN/jVXzjFDn3o0X6R1MW
IMv2ZHk0NInGFaVHyBD7ob3vh2+hWX0QIVTouqmPRVPIbVs4hAIVHGeOkkUCO8y9
MerGQuJSPlaegndGfRmp4R6q882QxTXRiY4tAnhdoDj5bLzss89kSKqxUHBDknZA
Fe+4R67G9zg=
=RmmC
-----END PGP SIGNATURE-----

@ -0,0 +1,17 @@
[main]
cachedir=@PWD@/cachedir
debuglevel=1
logfile=@PWD@/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
reposdir=/dev/null
modulesdir=@PWD@/modules
[local]
name=local
baseurl=file://@PWD@/repo
failovermethod=priority
enabled=1
gpgcheck=0

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save