Re: [Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-29 Thread Richard W.M. Jones
On Thu, Jun 29, 2023 at 06:40:27PM +0200, Laszlo Ersek wrote: > On 6/29/23 17:48, Richard W.M. Jones wrote: > > On Thu, Jun 29, 2023 at 05:39:34PM +0200, Laszlo Ersek wrote: > >> On 6/29/23 14:54, Richard W.M. Jones wrote: > >>> On Thu, Jun 29, 2023 at 02:34:42PM +0200, Laszlo Ersek wrote: >

Re: [Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-29 Thread Laszlo Ersek
On 6/29/23 17:48, Richard W.M. Jones wrote: > On Thu, Jun 29, 2023 at 05:39:34PM +0200, Laszlo Ersek wrote: >> On 6/29/23 14:54, Richard W.M. Jones wrote: >>> On Thu, Jun 29, 2023 at 02:34:42PM +0200, Laszlo Ersek wrote: Currently "chown_for_libvirt_rhbz_1045069" is best effort; if it fails,

Re: [Libguestfs] [PATCH guestfs-tools] customize: Implement --chown option

2023-06-29 Thread Richard W.M. Jones
On Thu, Jun 29, 2023 at 06:09:07PM +0200, Laszlo Ersek wrote: > On 6/29/23 14:50, Richard W.M. Jones wrote: > > This currently only works with numeric UID.GID. In theory in future > > we could look up IDs from the guest password file (eg. using Augeas) > > and do the right thing, but that's a

Re: [Libguestfs] [PATCH libguestfs] generator: Add --chown option for virt-customize

2023-06-29 Thread Laszlo Ersek
On 6/29/23 14:49, Richard W.M. Jones wrote: > Also this updates the common submodule to include the changes. > > Fixes: https://github.com/rwmjones/guestfs-tools/issues/12 > --- > common | 2 +- > generator/customize.ml | 28 > 2 files changed, 29

Re: [Libguestfs] [PATCH guestfs-tools] customize: Implement --chown option

2023-06-29 Thread Laszlo Ersek
On 6/29/23 14:50, Richard W.M. Jones wrote: > This currently only works with numeric UID.GID. In theory in future > we could look up IDs from the guest password file (eg. using Augeas) > and do the right thing, but that's a bunch more work. > > For example: > > $ ./builder/virt-builder

Re: [Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-29 Thread Richard W.M. Jones
On Thu, Jun 29, 2023 at 05:39:34PM +0200, Laszlo Ersek wrote: > On 6/29/23 14:54, Richard W.M. Jones wrote: > > On Thu, Jun 29, 2023 at 02:34:42PM +0200, Laszlo Ersek wrote: > >> Currently "chown_for_libvirt_rhbz_1045069" is best effort; if it fails, we > >> suppress the exception (we log it in

Re: [Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-29 Thread Laszlo Ersek
On 6/29/23 14:54, Richard W.M. Jones wrote: > On Thu, Jun 29, 2023 at 02:34:42PM +0200, Laszlo Ersek wrote: >> Currently "chown_for_libvirt_rhbz_1045069" is best effort; if it fails, we >> suppress the exception (we log it in verbose mode only, even). >> >> That's not proved helpful: it almost

Re: [Libguestfs] [PATCH libguestfs] generator: Add --chown option for virt-customize

2023-06-29 Thread Richard W.M. Jones
On Thu, Jun 29, 2023 at 01:49:49PM +0100, Richard W.M. Jones wrote: > Also this updates the common submodule to include the changes. > > Fixes: https://github.com/rwmjones/guestfs-tools/issues/12 > --- > common | 2 +- > generator/customize.ml | 28 >

Re: [Libguestfs] [v2v PATCH v2 1/3] lib/utils: fix typo

2023-06-29 Thread Richard W.M. Jones
On Thu, Jun 29, 2023 at 02:34:41PM +0200, Laszlo Ersek wrote: > Fix a small comment typo from commit 4e7f20684373 ("lib: Improve security > of in/out sockets when running virt-v2v as root", 2022-03-23). > > Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024 > Signed-off-by: Laszlo

Re: [Libguestfs] [v2v PATCH v2 3/3] docs/virt-v2v: document libvirt system instance startup

2023-06-29 Thread Richard W.M. Jones
On Thu, Jun 29, 2023 at 02:34:43PM +0200, Laszlo Ersek wrote: > It has frequently tripped us up that on RHEL / Fedora, installing the > right set of libvirt RPMs (such as the one pulled in by > "libvirt-daemon-kvm") does not result in an immediately running libvirt > system instance. Document the

Re: [Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-29 Thread Richard W.M. Jones
On Thu, Jun 29, 2023 at 02:34:42PM +0200, Laszlo Ersek wrote: > Currently "chown_for_libvirt_rhbz_1045069" is best effort; if it fails, we > suppress the exception (we log it in verbose mode only, even). > > That's not proved helpful: it almost certainly leads to later errors, but > those errors

[Libguestfs] [PATCH guestfs-tools] customize: Implement --chown option

2023-06-29 Thread Richard W.M. Jones
This currently only works with numeric UID.GID. In theory in future we could look up IDs from the guest password file (eg. using Augeas) and do the right thing, but that's a bunch more work. For example: $ ./builder/virt-builder fedora-36 --chown 1.1:/var/tmp [ 1.0] Downloading:

[Libguestfs] [PATCH libguestfs] generator: Add --chown option for virt-customize

2023-06-29 Thread Richard W.M. Jones
Also this updates the common submodule to include the changes. Fixes: https://github.com/rwmjones/guestfs-tools/issues/12 --- common | 2 +- generator/customize.ml | 28 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/common b/common

[Libguestfs] [v2v PATCH v2 3/3] docs/virt-v2v: document libvirt system instance startup

2023-06-29 Thread Laszlo Ersek
It has frequently tripped us up that on RHEL / Fedora, installing the right set of libvirt RPMs (such as the one pulled in by "libvirt-daemon-kvm") does not result in an immediately running libvirt system instance. Document the need, and the simplest method, for starting libvirt up manually.

[Libguestfs] [v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard

2023-06-29 Thread Laszlo Ersek
Currently "chown_for_libvirt_rhbz_1045069" is best effort; if it fails, we suppress the exception (we log it in verbose mode only, even). That's not proved helpful: it almost certainly leads to later errors, but those errors are less clear than the original (suppressed) exception. Namely, the

[Libguestfs] [v2v PATCH v2 1/3] lib/utils: fix typo

2023-06-29 Thread Laszlo Ersek
Fix a small comment typo from commit 4e7f20684373 ("lib: Improve security of in/out sockets when running virt-v2v as root", 2022-03-23). Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024 Signed-off-by: Laszlo Ersek --- Notes: v2: - new patch lib/utils.mli | 2 +- 1

[Libguestfs] [v2v PATCH v2 0/3] improve UX when running as root and we can't chown

2023-06-29 Thread Laszlo Ersek
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2182024 v1 was here: . Make any "chown_for_libvirt_rhbz_1045069" failure a hard one; that way the user gets to see more direct and more uniform error messages (namely that