[Libguestfs] [libnbd PATCH v2 0/4] start wrapping generated C source code harder at 80 chars

2023-04-21 Thread Laszlo Ersek
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516 v1: https://listman.redhat.com/archives/libguestfs/2023-April/031340.html Patches #1 and #2 are unchanged (beyond picking up Rich's R-b). Patch#3 is new. I've updated patch#4 (see the notes on the patch). Thanks for reviewing,

[Libguestfs] [libnbd PATCH v2 1/4] scripts/git.orderfile: drop "generator/generator"

2023-04-21 Thread Laszlo Ersek
Since commit 33f6d55891f2 ("generator: Split the generator script into separate files and compile it.", 2020-02-29), "generator/generator" has been a binary file and has not been tracked under version control; the commit even added "generator/generator" to ".gitignore". Therefore, we don't expect

[Libguestfs] [libnbd PATCH v2 3/4] generator/utils: import the "spaces" func from libguestfs-common Std_utils

2023-04-21 Thread Laszlo Ersek
In "pr_wrap" we already print a sequence of spaces, and we'll print more in a subsequent patch. Copy the "spaces" function from libguestfs-common Std_utils, which lets us avoid open-coded loops. "spaces" was added to libguestfs-common in commit e067192a90dc ("mllib: Split ‘Common_utils’ into

[Libguestfs] [libnbd PATCH v2 2/4] scripts/git.orderfile: put *.mli first among generator files

2023-04-21 Thread Laszlo Ersek
Similarly to how we put *.h (i.e., interface) files first among C-language source code, move *.mli to the top of the (OCaml-language) generator files in patches. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516 Signed-off-by: Laszlo Ersek Reviewed-by: Richard W.M. Jones --- Notes:

[Libguestfs] [libnbd PATCH v2 4/4] generator: indent C argument list 2 spaces relative to function designator

2023-04-21 Thread Laszlo Ersek
Change the optional "parens" parameter of "print_arg_list" from bool to a new union type. The new union type has three data constructors, NoParens (matching the previous "false" value), ParensSameLine (matching the previous "true" value), and a third constructor called "ParensNewLineWithIndent",

[Libguestfs] [PATCH nbdkit] rust: Add implementation of after_fork() method

2023-04-21 Thread Richard W.M. Jones
See: https://github.com/libguestfs/nbdkit/issues/21 Tested by applying the following patch to the example plugin and running it with verbose enabled: --- a/plugins/rust/examples/ramdisk.rs +++ b/plugins/rust/examples/ramdisk.rs @@ -43,6 +43,12 @@ struct RamDisk { } impl Server for RamDisk { +

Re: [Libguestfs] [PATCH nbdkit] rust: Add implementation of after_fork() method

2023-04-21 Thread Laszlo Ersek
On 4/21/23 11:20, Richard W.M. Jones wrote: > See: https://github.com/libguestfs/nbdkit/issues/21 > > Tested by applying the following patch to the example plugin and > running it with verbose enabled: > > --- a/plugins/rust/examples/ramdisk.rs > +++ b/plugins/rust/examples/ramdisk.rs > @@ -43,6

[Libguestfs] [COMMON PATCH 0/1] mlcustomize: skip SELinux relabeling if it's disabled

2023-04-21 Thread Andrey Drobyshev
This patch effectively limits the number of cases when we would want to do a complete SELinux relabeling on Linux guest conversion. This was brought to my attention as we've recently had a support case when the conversion was taking too much time mostly because of relabeling performed with

[Libguestfs] [COMMON PATCH 1/1] mlcustomize: skip SELinux relabeling if it's disabled

2023-04-21 Thread Andrey Drobyshev
From: Roman Kagan Even if SELinux config file and policy tools are present, SELinux may be turned off by a setting in that config file, "SELINUX", having a value of "disabled". Detect this case and skip relabeling. Signed-off-by: Roman Kagan --- mlcustomize/SELinux_relabel.ml | 16

Re: [Libguestfs] [PATCH nbdkit] rust: Add implementation of after_fork() method

2023-04-21 Thread Richard W.M. Jones
On Fri, Apr 21, 2023 at 10:20:35AM +0100, Richard W.M. Jones wrote: > impl Server for RamDisk { > +fn after_fork() -> Result<()> { > +// A place to start background threads. > +eprintln!("forked"); Alan, this reminds me that there is no binding for nbdkit_debug. I think

Re: [Libguestfs] [libnbd PATCH v2 4/4] generator: indent C argument list 2 spaces relative to function designator

2023-04-21 Thread Richard W.M. Jones
Patches 3 & 4 look good. For the series: Reviewed-by: Richard W.M. Jones Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with

Re: [Libguestfs] [PATCH nbdkit] rust: Add implementation of after_fork() method

2023-04-21 Thread Richard W.M. Jones
On Fri, Apr 21, 2023 at 11:32:31AM +0200, Laszlo Ersek wrote: > On 4/21/23 11:20, Richard W.M. Jones wrote: > > See: https://github.com/libguestfs/nbdkit/issues/21 > > > > Tested by applying the following patch to the example plugin and > > running it with verbose enabled: > > > > ---

Re: [Libguestfs] [PATCH nbdkit] rust: Add implementation of after_fork() method

2023-04-21 Thread alan somers
On Fri, Apr 21, 2023 at 2:32 AM Laszlo Ersek wrote: > > On 4/21/23 11:20, Richard W.M. Jones wrote: > > See: https://github.com/libguestfs/nbdkit/issues/21 > > > > Tested by applying the following patch to the example plugin and > > running it with verbose enabled: > > > > ---

Re: [Libguestfs] [PATCH nbdkit] rust: Add implementation of after_fork() method

2023-04-21 Thread Richard W.M. Jones
On Fri, Apr 21, 2023 at 06:30:52AM -0700, alan somers wrote: > On Fri, Apr 21, 2023 at 2:32 AM Laszlo Ersek wrote: > > > > On 4/21/23 11:20, Richard W.M. Jones wrote: > > > See: https://github.com/libguestfs/nbdkit/issues/21 > > > > > > Tested by applying the following patch to the example plugin

Re: [Libguestfs] [libnbd PATCH v2 4/4] generator: indent C argument list 2 spaces relative to function designator

2023-04-21 Thread Laszlo Ersek
On 4/21/23 12:17, Richard W.M. Jones wrote: > Patches 3 & 4 look good. > > For the series: > > Reviewed-by: Richard W.M. Jones Commit range 86820dbab497..0744f748ed90. Thanks! Laszlo ___ Libguestfs mailing list Libguestfs@redhat.com