[libvirt] [PATCH v2] Requires gettext for client package

libvirt-guests invokes functions in gettext.sh, so we need to require gettext package in spec file. Demo with the fix: % rpm -q gettext package gettext is not installed % rpm -ivh libvirt-client-0.8.8-1.fc14.x86_64.rpm error: Failed dependencies: gettext is needed by libvirt-client-0.8.8-1.fc14.x86_64 * libvirt.spec.in --- libvirt.spec.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index d4208e8..c4b4e7f 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -415,6 +415,7 @@ Requires: ncurses # So remote clients can access libvirt over SSH tunnel # (client invokes 'nc' against the UNIX socket on the server) Requires: nc +Requires: gettext %if %{with_sasl} Requires: cyrus-sasl # Not technically required, but makes 'out-of-box' config -- 1.7.4

On 02/17/2011 03:05 AM, Osier Yang wrote:
libvirt-guests invokes functions in gettext.sh, so we need to require gettext package in spec file.
Demo with the fix: % rpm -q gettext package gettext is not installed
% rpm -ivh libvirt-client-0.8.8-1.fc14.x86_64.rpm error: Failed dependencies: gettext is needed by libvirt-client-0.8.8-1.fc14.x86_64
+++ b/libvirt.spec.in @@ -415,6 +415,7 @@ Requires: ncurses # So remote clients can access libvirt over SSH tunnel # (client invokes 'nc' against the UNIX socket on the server) Requires: nc
[note to self - it might be possible to drop the nc dependency in the future, once I finish my conversion from -migration exec: to -migration fd:, since the spec file only targets distros with new-enough qemu 0.12.0 or newer; nc would still be needed for qemu 0.10.0, though]
+Requires: gettext
Maybe worth adding a comment before this line, justifying the requires (just like we did before the nc requirement): # Needed by libvirt-guests init script ACK with that nit addressed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

On 18/02/2011, at 7:12 AM, Eric Blake wrote: <snip>
[note to self - it might be possible to drop the nc dependency in the future, once I finish my conversion from -migration exec: to -migration fd:, since the spec file only targets distros with new-enough qemu 0.12.0 or newer; nc would still be needed for qemu 0.10.0, though]
Does your conversion affect how libvirt uses ssh for general communication? Pretty sure I've seen some part of libvirt (other than migration) use nc + ssh for general communication to remote qemu (ie with qemu+ssh://).

On 02/17/2011 01:19 PM, Justin Clift wrote:
On 18/02/2011, at 7:12 AM, Eric Blake wrote: <snip>
[note to self - it might be possible to drop the nc dependency in the future, once I finish my conversion from -migration exec: to -migration fd:, since the spec file only targets distros with new-enough qemu 0.12.0 or newer; nc would still be needed for qemu 0.10.0, though]
Does your conversion affect how libvirt uses ssh for general communication?
Pretty sure I've seen some part of libvirt (other than migration) use nc + ssh for general communication to remote qemu (ie with qemu+ssh://).
git grep '"nc"' has two hits: src/qemu/qemu_migration.c: const char *args[] = { "nc", "-U", unixfile, NULL }; Will still need to exist for qemu 0.10.x and 0.11.x (so we'd need it for RHEL 5.6, but not for Fedora or RHEL 6; we've already got other RHEL-version-related checks in the specfile to make that a conditional dependency). src/remote/remote_driver.c: cmd_argv[j++] = strdup (netcat ? netcat : "nc"); Oh wow - we need to convert remote_driver.c over to virCommand. However, that's the only other use of "nc", and it involves running nc on the remote host, not on the local host, so you _don't_ need to 'Requires: nc' just because you installed libvirt-client; rather, it seems like it should be libvirt (the server package) that should be requiring nc. In other words, I think we have a missing dependency if you install libvirt but not libvirt-client; the reality is that both packages should require nc (and libvirt-client can make the dependency conditional if I improve migration on newer qemu). -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org

于 2011年02月18日 08:30, Eric Blake 写道:
On 02/17/2011 01:19 PM, Justin Clift wrote:
On 18/02/2011, at 7:12 AM, Eric Blake wrote: <snip>
[note to self - it might be possible to drop the nc dependency in the future, once I finish my conversion from -migration exec: to -migration fd:, since the spec file only targets distros with new-enough qemu 0.12.0 or newer; nc would still be needed for qemu 0.10.0, though]
Does your conversion affect how libvirt uses ssh for general communication?
Pretty sure I've seen some part of libvirt (other than migration) use nc + ssh for general communication to remote qemu (ie with qemu+ssh://).
git grep '"nc"' has two hits:
src/qemu/qemu_migration.c: const char *args[] = { "nc", "-U", unixfile, NULL };
Will still need to exist for qemu 0.10.x and 0.11.x (so we'd need it for RHEL 5.6, but not for Fedora or RHEL 6; we've already got other RHEL-version-related checks in the specfile to make that a conditional dependency).
src/remote/remote_driver.c: cmd_argv[j++] = strdup (netcat ? netcat : "nc");
Oh wow - we need to convert remote_driver.c over to virCommand. However, that's the only other use of "nc", and it involves running nc on the remote host, not on the local host, so you _don't_ need to 'Requires: nc' just because you installed libvirt-client; rather, it seems like it should be libvirt (the server package) that should be requiring nc.
<snip> rather, it seems like it should be libvirt (the server package) that should berequiring nc. </snip> Would like to confirm it and make patch if it is needed indeed.
In other words, I think we have a missing dependency if you install libvirt but not libvirt-client; the reality is that both packages should require nc (and libvirt-client can make the dependency conditional if I improve migration on newer qemu).

On Thu, Feb 17, 2011 at 05:30:02PM -0700, Eric Blake wrote:
On 02/17/2011 01:19 PM, Justin Clift wrote:
On 18/02/2011, at 7:12 AM, Eric Blake wrote: <snip>
[note to self - it might be possible to drop the nc dependency in the future, once I finish my conversion from -migration exec: to -migration fd:, since the spec file only targets distros with new-enough qemu 0.12.0 or newer; nc would still be needed for qemu 0.10.0, though]
Does your conversion affect how libvirt uses ssh for general communication?
Pretty sure I've seen some part of libvirt (other than migration) use nc + ssh for general communication to remote qemu (ie with qemu+ssh://).
git grep '"nc"' has two hits:
src/qemu/qemu_migration.c: const char *args[] = { "nc", "-U", unixfile, NULL };
Will still need to exist for qemu 0.10.x and 0.11.x (so we'd need it for RHEL 5.6, but not for Fedora or RHEL 6; we've already got other RHEL-version-related checks in the specfile to make that a conditional dependency).
src/remote/remote_driver.c: cmd_argv[j++] = strdup (netcat ? netcat : "nc");
Oh wow - we need to convert remote_driver.c over to virCommand. However, that's the only other use of "nc", and it involves running nc on the remote host, not on the local host, so you _don't_ need to 'Requires: nc' just because you installed libvirt-client; rather, it seems like it should be libvirt (the server package) that should be requiring nc.
In other words, I think we have a missing dependency if you install libvirt but not libvirt-client; the reality is that both packages should require nc (and libvirt-client can make the dependency conditional if I improve migration on newer qemu).
libvirt requires libvirt-client, so its impossible to install it without libvirt-client already present. Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

于 2011年02月18日 04:12, Eric Blake 写道:
On 02/17/2011 03:05 AM, Osier Yang wrote:
libvirt-guests invokes functions in gettext.sh, so we need to require gettext package in spec file.
Demo with the fix: % rpm -q gettext package gettext is not installed
% rpm -ivh libvirt-client-0.8.8-1.fc14.x86_64.rpm error: Failed dependencies: gettext is needed by libvirt-client-0.8.8-1.fc14.x86_64
+++ b/libvirt.spec.in @@ -415,6 +415,7 @@ Requires: ncurses # So remote clients can access libvirt over SSH tunnel # (client invokes 'nc' against the UNIX socket on the server) Requires: nc
[note to self - it might be possible to drop the nc dependency in the future, once I finish my conversion from -migration exec: to -migration fd:, since the spec file only targets distros with new-enough qemu 0.12.0 or newer; nc would still be needed for qemu 0.10.0, though]
+Requires: gettext
Maybe worth adding a comment before this line, justifying the requires (just like we did before the nc requirement):
# Needed by libvirt-guests init script
ACK with that nit addressed.
Pushed with the comments added Regards, Osier
participants (4)
-
Daniel P. Berrange
-
Eric Blake
-
Justin Clift
-
Osier Yang