Re: [Libguestfs] Cargo edition problem with Debian 11
On Mon, Jan 16, 2023 at 5:04 AM Martin Kletzander wrote: > > On Fri, Jan 13, 2023 at 08:23:05PM +, Richard W.M. Jones wrote: > >On Fri, Jan 13, 2023 at 01:06:09PM -0700, alan somers wrote: > >> Which files get overwritten by libvirt-ci ? > > > >I think it's everything except ci/manifest.yml, possibly. > >Eric and Martin (CC'd) know more about this. > > > >The libvirt-ci page is: > >https://libvirt.org/ci.html > > > >And the command I use to regenerate everything is: > >../libvirt-ci/bin/lcitool manifest ci/manifest.yml > > > > I came back, went through the thread and upstream MRs and here are some > things I came up with: > > The predicates crate since version 1.0.4 do not support rust older than > 1.60.0, so it should be decided whether nbdkit wants to support > Debian 11, whether nbdkit wants to support the rust plugin on systems > with older rust versions and so on. Based on that decision there are > ways to fix this issue. > > Not supporting Debian 11 is easy to achieve, of course, but probably not > wanted. > > Not supporting older rust would just need disabling rust plugin builds > with old rust in configure.ac and then on those specific systems in CI. > > If you want to make this work in all currently tested scenarios, then I > guess adding: > > predicates-core = "=1.0.3" > predicates-tree = "=1.0.3" > > to the [dev-dependencies] in Cargo.toml. That would however be > applicable to all systems and necessitate future update(s). We shouldn't do that, because it would prevent any consumers from using newer versions of those crates. > > If you want to do something in the CI then the easiest place is > ci/build.sh. For Cirrus CI I think it could be erased since most of it > is also checked elsewhere, although not all things have been migrated to > the other CI solution, like clippy, if I am correct. > > But another thing is, why is the minimum rust version in .cirrus.yml set > to rust 1.46.0? Increasing that would clearly fix the cirrus version > issue. That was a reasonable value at the time we set it. But that was more than a year ago. There's no "right" answer for what the MSRV ought to be. The best guideline is that it should be no newer than the version of the Rust package shipped by the oldest OS we care about. By that logic, we can raise it to 1.48.0 but no higher. > > During the adoption of libvirt-ci I knew a bit more about it, but it > also keeps changing faster than me keeping eye on it. So I'm not sure > about most recent changes. Hopefully what I documented in ci/ is either > still true or was updated together with an lcitool update. But in > hindsight I think moving the build instructions into ci/build.sh was the > right choice. What lcitool does really well is abstract lot of the > managing of distros, versions and package naming to make it consistent. > > >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 many > >powerful monitoring features, net stats, disk stats, logging, etc. > >http://people.redhat.com/~rjones/virt-top > > ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 06:34:29PM +, Richard W.M. Jones wrote: > > https://github.com/libguestfs/nbdkit/pull/19 > > Actually I suspect that the changes made in PR19 will get overwritten > since they touch files which are in git but are really controlled by > libvirt-ci. > > I'm not sure how to make the changes in a way which are compatible > with libvirt-ci, maybe Eric or others can help with that. > > Rich. So, I looked at the PR and don't see any files that would be overwritten by lcitool as none of the 3 (plugins/..., .cirrus.yml) are managed by lcitool, so from that perspective, it's safe. I read the whole conversation and if I understand the problem well, Debian ships an old Rust toolchain which doesn't play well with the latest crate dependencies you specify (? Sorry if I got it wrong, I know nothing about Rust). In any case, the change I'm seeing in the PR 19: rustc --version | grep -q 1.46.0 && mv plugins/rust/Cargo.lock.msrv plugins/rust/Cargo.lock doesn't really cover the 1.48.0 version on Debian, does it? I guess you'll have to improve the Bash check to cover all affected Rust versions. Looking at your autotools Makefiles, to fix this for all platforms you run as part of the CI, the fix IIUC needs to go to plugins/rust/Makefile.am not to anything lcitool manages - disabling Debian as a platform from building nbdkit stuff with Rust even though a simple workaround exists seems the wrong approach to me. Regards, Erik ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
On Mon, Jan 16, 2023 at 01:04:03PM +0100, Martin Kletzander wrote: > On Fri, Jan 13, 2023 at 08:23:05PM +, Richard W.M. Jones wrote: > > On Fri, Jan 13, 2023 at 01:06:09PM -0700, alan somers wrote: > > > Which files get overwritten by libvirt-ci ? > > > > I think it's everything except ci/manifest.yml, possibly. > > Eric and Martin (CC'd) know more about this. > > > > The libvirt-ci page is: > > https://libvirt.org/ci.html > > > > And the command I use to regenerate everything is: > > ../libvirt-ci/bin/lcitool manifest ci/manifest.yml > > > > I came back, went through the thread and upstream MRs and here are some > things I came up with: > > The predicates crate since version 1.0.4 do not support rust older than > 1.60.0, so it should be decided whether nbdkit wants to support > DebianĀ 11, whether nbdkit wants to support the rust plugin on systems > with older rust versions and so on. Based on that decision there are > ways to fix this issue. > > Not supporting Debian 11 is easy to achieve, of course, but probably not > wanted. > > Not supporting older rust would just need disabling rust plugin builds > with old rust in configure.ac and then on those specific systems in CI. > > If you want to make this work in all currently tested scenarios, then I > guess adding: > > predicates-core = "=1.0.3" > predicates-tree = "=1.0.3" > > to the [dev-dependencies] in Cargo.toml. That would however be > applicable to all systems and necessitate future update(s). > > If you want to do something in the CI then the easiest place is > ci/build.sh. For Cirrus CI I think it could be erased since most of it > is also checked elsewhere, although not all things have been migrated to > the other CI solution, like clippy, if I am correct. > What would be the thing you're suggesting for ci/build.sh? It's merely calling configure and then make, so as long as the Rust build needs to be addressed, then ci/build.sh isn't the place as it's only supposed to automate some build steps not fix them IIUC. Erik ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
Thanks everyone. Just a note that nbdkit CI is passing right now. I disabled the rust plugin (only) for the troublesome distros. Also I fixed a bunch of other things that were broken. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 08:23:05PM +, Richard W.M. Jones wrote: On Fri, Jan 13, 2023 at 01:06:09PM -0700, alan somers wrote: Which files get overwritten by libvirt-ci ? I think it's everything except ci/manifest.yml, possibly. Eric and Martin (CC'd) know more about this. The libvirt-ci page is: https://libvirt.org/ci.html And the command I use to regenerate everything is: ../libvirt-ci/bin/lcitool manifest ci/manifest.yml I came back, went through the thread and upstream MRs and here are some things I came up with: The predicates crate since version 1.0.4 do not support rust older than 1.60.0, so it should be decided whether nbdkit wants to support DebianĀ 11, whether nbdkit wants to support the rust plugin on systems with older rust versions and so on. Based on that decision there are ways to fix this issue. Not supporting Debian 11 is easy to achieve, of course, but probably not wanted. Not supporting older rust would just need disabling rust plugin builds with old rust in configure.ac and then on those specific systems in CI. If you want to make this work in all currently tested scenarios, then I guess adding: predicates-core = "=1.0.3" predicates-tree = "=1.0.3" to the [dev-dependencies] in Cargo.toml. That would however be applicable to all systems and necessitate future update(s). If you want to do something in the CI then the easiest place is ci/build.sh. For Cirrus CI I think it could be erased since most of it is also checked elsewhere, although not all things have been migrated to the other CI solution, like clippy, if I am correct. But another thing is, why is the minimum rust version in .cirrus.yml set to rust 1.46.0? Increasing that would clearly fix the cirrus version issue. During the adoption of libvirt-ci I knew a bit more about it, but it also keeps changing faster than me keeping eye on it. So I'm not sure about most recent changes. Hopefully what I documented in ci/ is either still true or was updated together with an lcitool update. But in hindsight I think moving the build instructions into ci/build.sh was the right choice. What lcitool does really well is abstract lot of the managing of distros, versions and package naming to make it consistent. 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 many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top signature.asc Description: PGP signature ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 01:06:09PM -0700, alan somers wrote: > Which files get overwritten by libvirt-ci ? I think it's everything except ci/manifest.yml, possibly. Eric and Martin (CC'd) know more about this. The libvirt-ci page is: https://libvirt.org/ci.html And the command I use to regenerate everything is: ../libvirt-ci/bin/lcitool manifest ci/manifest.yml 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 many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
Which files get overwritten by libvirt-ci ? On Fri, Jan 13, 2023 at 11:34 AM Richard W.M. Jones wrote: > > > https://github.com/libguestfs/nbdkit/pull/19 > > Actually I suspect that the changes made in PR19 will get overwritten > since they touch files which are in git but are really controlled by > libvirt-ci. > > I'm not sure how to make the changes in a way which are compatible > with libvirt-ci, maybe Eric or others can help with that. > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > virt-builder quickly builds VMs from scratch > http://libguestfs.org/virt-builder.1.html > ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
> https://github.com/libguestfs/nbdkit/pull/19 Actually I suspect that the changes made in PR19 will get overwritten since they touch files which are in git but are really controlled by libvirt-ci. I'm not sure how to make the changes in a way which are compatible with libvirt-ci, maybe Eric or others can help with that. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 11:18:10AM -0700, alan somers wrote: > I approved PR 21. But I'd like to merge PR 19 too, to fix the Cirrus > CI that runs on the Github mirror. Sure thing! Please go ahead, as I'm going to wait for PR21 to see exactly what tests still fail. 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 many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
I approved PR 21. But I'd like to merge PR 19 too, to fix the Cirrus CI that runs on the Github mirror. On Fri, Jan 13, 2023 at 11:03 AM Richard W.M. Jones wrote: > > On Fri, Jan 13, 2023 at 06:00:07PM +, Richard W.M. Jones wrote: > > I'll push something to PR#19 in a few mins. > > Actually I don't think I can modify it, so I opened an alternate PR: > > https://gitlab.com/nbdkit/nbdkit/-/merge_requests/21 > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > virt-builder quickly builds VMs from scratch > http://libguestfs.org/virt-builder.1.html > ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 06:00:07PM +, Richard W.M. Jones wrote: > I'll push something to PR#19 in a few mins. Actually I don't think I can modify it, so I opened an alternate PR: https://gitlab.com/nbdkit/nbdkit/-/merge_requests/21 Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 10:52:33AM -0700, alan somers wrote: > There actually isn't any real problem to fix; it's purely a CI problem. > > Our Cargo.toml file (and transitively, our dependencies' Cargo.toml > files) specify that we need predicates-tree and predicates-core. > Unless instructed otherwise, Cargo will attempt to fetch the latest > compatible version. However, the latest compatible versions don't > build with the older toolchain. That why my PR adds a Cargo.lock file > which locks predicates-tree and predicates-core to exact versions that > are known to be compatible with Rust 1.48.0. That fixes the build in > CI. > > But the thing is, a Rust library crate never ships a Cargo.lock file. > Even if it did, Cargo would ignore it when building an application > that depends on that library. So if any of nbdkit's consumers want to > build with Rust 1.48.0, they'll have to do the same Cargo.lock dance > that I did. We don't need to make any changes to facilitate that. > Furthermore, nbdkit's consumers probably _won't_ need to do this at > all, because predicates-tree and predicates-core are merely > dev-dependencies of nbdkit. Our consumers won't necessarily need to > fetch them at all. > > Does that make sense? And knowing this, would you prefer to skip the > Rust build in those environments, or do the Cargo.lock thing? I'd be > ok with either. Understood. So let's skip the test on the platform that fails. I'll push something to PR#19 in a few mins. Rich. > On Fri, Jan 13, 2023 at 10:43 AM Richard W.M. Jones wrote: > > > > On Fri, Jan 13, 2023 at 09:17:29AM -0700, alan somers wrote: > > > Oh, I misread your initial mail. I saw "Debian" in the subject line > > > and assumed you were talking about packaging. But you weren't. This > > > is happening in CI for every platform. > > > > > > There's a straightforward way to fix the problem for Cirrus CI, the > > > one that runs after we mirror to Github. But it requires an extra > > > step, and I'm not sure how to configure that for the .gitlab CI stuff. > > > I'll submit a partial PR and ask for help with the gitlab CI part. > > > > > > You aren't using gitlab CI to build release artifacts, are you? > > > > We're using a rather complicated scheme called libvirt-ci which > > I don't fully understand. (Adding Eric to CC) > > > > Re your merge request here: > > > > https://github.com/libguestfs/nbdkit/pull/19 > > > > I believe we could do this more easily for debian-11 simply by adding > > > >RUST: skip > > > > to the relevant section of ci/manifest.yml. > > > > However my main thing is could we actually fix it instead of covering > > up the problem in CI? > > > > Rich. > > > > > On Fri, Jan 13, 2023 at 8:57 AM Richard W.M. Jones > > > wrote: > > > > > > > > On Fri, Jan 13, 2023 at 08:35:08AM -0700, alan somers wrote: > > > > > The nbdkit crate. Why does Debian need a package for it? > > > > > > > > I'm not sure -- do they have one? I can't seem to find it. > > > > > > > > Rich. > > > > > > > > > On Fri, Jan 13, 2023 at 8:30 AM Richard W.M. Jones > > > > > wrote: > > > > > > > > > > > > On Fri, Jan 13, 2023 at 08:25:28AM -0700, alan somers wrote: > > > > > > > IMHO this is a design bug in Debian. Sure, they need to create > > > > > > > packages for any Rust crate that needs to install executable or > > > > > > > .so > > > > > > > files. But crates like nbdkit don't install anything. They're > > > > > > > only > > > > > > > used to build other Rust crates, and only used at compile time. > > > > > > > They > > > > > > > can simply be fetched during the package building process. I > > > > > > > really > > > > > > > don't know what Debian is doing by packaging this crate. Is it > > > > > > > actually trying to install the ramdisk example? > > > > > > > > > > > > I'm not sure I understand - which crate? > > > > > > > > > > > > Rich. > > > > > > > > > > > > > On Fri, Jan 13, 2023 at 7:27 AM Richard W.M. Jones > > > > > > > wrote: > > > > > > > > > > > > > > > > On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote: > > > > > > > > > I think we should downgrade predicates-tree to 1.0.5 or > > > > > > > > > older. I can > > > > > > > > > submit a PR for that. What does "rustc --version" show you? > > > > > > > > > > > > > > > > Unfortunately our configure script doesn't collect that > > > > > > > > information > > > > > > > > (it should do! - I'll fix that in a moment). > > > > > > > > > > > > > > > > But based on it being Debian 11 ("bullseye") it's likely to be: > > > > > > > > > > > > > > > > https://packages.debian.org/bullseye/rustc > > > > > > > > Package: rustc (1.48.0+dfsg1-2) > > > > > > > > > > > > > > > > Which is pretty ancient ... > > > > > > > > > > > > > > > > Rich. > > > > > > > > > > > > > > > > > On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > > > >
Re: [Libguestfs] Cargo edition problem with Debian 11
There actually isn't any real problem to fix; it's purely a CI problem. Our Cargo.toml file (and transitively, our dependencies' Cargo.toml files) specify that we need predicates-tree and predicates-core. Unless instructed otherwise, Cargo will attempt to fetch the latest compatible version. However, the latest compatible versions don't build with the older toolchain. That why my PR adds a Cargo.lock file which locks predicates-tree and predicates-core to exact versions that are known to be compatible with Rust 1.48.0. That fixes the build in CI. But the thing is, a Rust library crate never ships a Cargo.lock file. Even if it did, Cargo would ignore it when building an application that depends on that library. So if any of nbdkit's consumers want to build with Rust 1.48.0, they'll have to do the same Cargo.lock dance that I did. We don't need to make any changes to facilitate that. Furthermore, nbdkit's consumers probably _won't_ need to do this at all, because predicates-tree and predicates-core are merely dev-dependencies of nbdkit. Our consumers won't necessarily need to fetch them at all. Does that make sense? And knowing this, would you prefer to skip the Rust build in those environments, or do the Cargo.lock thing? I'd be ok with either. On Fri, Jan 13, 2023 at 10:43 AM Richard W.M. Jones wrote: > > On Fri, Jan 13, 2023 at 09:17:29AM -0700, alan somers wrote: > > Oh, I misread your initial mail. I saw "Debian" in the subject line > > and assumed you were talking about packaging. But you weren't. This > > is happening in CI for every platform. > > > > There's a straightforward way to fix the problem for Cirrus CI, the > > one that runs after we mirror to Github. But it requires an extra > > step, and I'm not sure how to configure that for the .gitlab CI stuff. > > I'll submit a partial PR and ask for help with the gitlab CI part. > > > > You aren't using gitlab CI to build release artifacts, are you? > > We're using a rather complicated scheme called libvirt-ci which > I don't fully understand. (Adding Eric to CC) > > Re your merge request here: > > https://github.com/libguestfs/nbdkit/pull/19 > > I believe we could do this more easily for debian-11 simply by adding > >RUST: skip > > to the relevant section of ci/manifest.yml. > > However my main thing is could we actually fix it instead of covering > up the problem in CI? > > Rich. > > > On Fri, Jan 13, 2023 at 8:57 AM Richard W.M. Jones > > wrote: > > > > > > On Fri, Jan 13, 2023 at 08:35:08AM -0700, alan somers wrote: > > > > The nbdkit crate. Why does Debian need a package for it? > > > > > > I'm not sure -- do they have one? I can't seem to find it. > > > > > > Rich. > > > > > > > On Fri, Jan 13, 2023 at 8:30 AM Richard W.M. Jones > > > > wrote: > > > > > > > > > > On Fri, Jan 13, 2023 at 08:25:28AM -0700, alan somers wrote: > > > > > > IMHO this is a design bug in Debian. Sure, they need to create > > > > > > packages for any Rust crate that needs to install executable or .so > > > > > > files. But crates like nbdkit don't install anything. They're only > > > > > > used to build other Rust crates, and only used at compile time. > > > > > > They > > > > > > can simply be fetched during the package building process. I really > > > > > > don't know what Debian is doing by packaging this crate. Is it > > > > > > actually trying to install the ramdisk example? > > > > > > > > > > I'm not sure I understand - which crate? > > > > > > > > > > Rich. > > > > > > > > > > > On Fri, Jan 13, 2023 at 7:27 AM Richard W.M. Jones > > > > > > wrote: > > > > > > > > > > > > > > On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote: > > > > > > > > I think we should downgrade predicates-tree to 1.0.5 or older. > > > > > > > > I can > > > > > > > > submit a PR for that. What does "rustc --version" show you? > > > > > > > > > > > > > > Unfortunately our configure script doesn't collect that > > > > > > > information > > > > > > > (it should do! - I'll fix that in a moment). > > > > > > > > > > > > > > But based on it being Debian 11 ("bullseye") it's likely to be: > > > > > > > > > > > > > > https://packages.debian.org/bullseye/rustc > > > > > > > Package: rustc (1.48.0+dfsg1-2) > > > > > > > > > > > > > > Which is pretty ancient ... > > > > > > > > > > > > > > Rich. > > > > > > > > > > > > > > > On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > > > > > > > > > > > > > > > -- > > > > > > > > > cargo build --release --example ramdisk > > > > > > > > > Downloading crates ... > > > > > > > > > Downloaded float-cmp v0.9.0 > > > > > > > > > Downloaded downcast v0.11.0 > > > > > > > > > Downloaded mockall_derive v0.11.3 > > > > > > > > > Downloaded itertools v0.10.5 > > > > > > > > > Downloaded aho-corasick
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 09:17:29AM -0700, alan somers wrote: > Oh, I misread your initial mail. I saw "Debian" in the subject line > and assumed you were talking about packaging. But you weren't. This > is happening in CI for every platform. > > There's a straightforward way to fix the problem for Cirrus CI, the > one that runs after we mirror to Github. But it requires an extra > step, and I'm not sure how to configure that for the .gitlab CI stuff. > I'll submit a partial PR and ask for help with the gitlab CI part. > > You aren't using gitlab CI to build release artifacts, are you? We're using a rather complicated scheme called libvirt-ci which I don't fully understand. (Adding Eric to CC) Re your merge request here: https://github.com/libguestfs/nbdkit/pull/19 I believe we could do this more easily for debian-11 simply by adding RUST: skip to the relevant section of ci/manifest.yml. However my main thing is could we actually fix it instead of covering up the problem in CI? Rich. > On Fri, Jan 13, 2023 at 8:57 AM Richard W.M. Jones wrote: > > > > On Fri, Jan 13, 2023 at 08:35:08AM -0700, alan somers wrote: > > > The nbdkit crate. Why does Debian need a package for it? > > > > I'm not sure -- do they have one? I can't seem to find it. > > > > Rich. > > > > > On Fri, Jan 13, 2023 at 8:30 AM Richard W.M. Jones > > > wrote: > > > > > > > > On Fri, Jan 13, 2023 at 08:25:28AM -0700, alan somers wrote: > > > > > IMHO this is a design bug in Debian. Sure, they need to create > > > > > packages for any Rust crate that needs to install executable or .so > > > > > files. But crates like nbdkit don't install anything. They're only > > > > > used to build other Rust crates, and only used at compile time. They > > > > > can simply be fetched during the package building process. I really > > > > > don't know what Debian is doing by packaging this crate. Is it > > > > > actually trying to install the ramdisk example? > > > > > > > > I'm not sure I understand - which crate? > > > > > > > > Rich. > > > > > > > > > On Fri, Jan 13, 2023 at 7:27 AM Richard W.M. Jones > > > > > wrote: > > > > > > > > > > > > On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote: > > > > > > > I think we should downgrade predicates-tree to 1.0.5 or older. I > > > > > > > can > > > > > > > submit a PR for that. What does "rustc --version" show you? > > > > > > > > > > > > Unfortunately our configure script doesn't collect that information > > > > > > (it should do! - I'll fix that in a moment). > > > > > > > > > > > > But based on it being Debian 11 ("bullseye") it's likely to be: > > > > > > > > > > > > https://packages.debian.org/bullseye/rustc > > > > > > Package: rustc (1.48.0+dfsg1-2) > > > > > > > > > > > > Which is pretty ancient ... > > > > > > > > > > > > Rich. > > > > > > > > > > > > > On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > > > > > > > > > > > > > -- > > > > > > > > cargo build --release --example ramdisk > > > > > > > > Downloading crates ... > > > > > > > > Downloaded float-cmp v0.9.0 > > > > > > > > Downloaded downcast v0.11.0 > > > > > > > > Downloaded mockall_derive v0.11.3 > > > > > > > > Downloaded itertools v0.10.5 > > > > > > > > Downloaded aho-corasick v0.7.20 > > > > > > > > Downloaded predicates-tree v1.0.7 > > > > > > > > error: failed to parse manifest at > > > > > > > > `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > > > > > > > > Caused by: > > > > > > > > failed to parse the `edition` key > > > > > > > > Caused by: > > > > > > > > this version of Cargo is older than the `2021` edition, and > > > > > > > > only supports `2015` and `2018` editions. > > > > > > > > -- > > > > > > > > > > > > > > > > nbdkit itself uses edition = 2018, but this seems to affects > > > > > > > > one of > > > > > > > > the dependencies. > > > > > > > > > > > > > > > > I'm not sure how to solve this, but one ideas I had is in > > > > > > > > ./configure > > > > > > > > to check if the cargo/rust we're trying to use doesn't support > > > > > > > > some > > > > > > > > base edition (eg. latest edition supported < 2021) then we would > > > > > > > > disable rust bindings. > > > > > > > > > > > > > > > > Unfortunately actually getting the latest supported edition > > > > > > > > seems > > > > > > > > hard. The best I could find is parsing this which doesn't seem > > > > > > > > ideal: > > > > > > > > > > > > > > > > $ rustc --help |& grep -- --edition > > > > > > > > --edition 2015|2018|2021|2024 > > > > > > > > > > > > > > > > What do you think? > > > > > > > > > > > > > > > > Rich. > > > > > > > > > > > > > > > > -- > > > > > > > > Richard Jones,
Re: [Libguestfs] Cargo edition problem with Debian 11
Oh, I misread your initial mail. I saw "Debian" in the subject line and assumed you were talking about packaging. But you weren't. This is happening in CI for every platform. There's a straightforward way to fix the problem for Cirrus CI, the one that runs after we mirror to Github. But it requires an extra step, and I'm not sure how to configure that for the .gitlab CI stuff. I'll submit a partial PR and ask for help with the gitlab CI part. You aren't using gitlab CI to build release artifacts, are you? On Fri, Jan 13, 2023 at 8:57 AM Richard W.M. Jones wrote: > > On Fri, Jan 13, 2023 at 08:35:08AM -0700, alan somers wrote: > > The nbdkit crate. Why does Debian need a package for it? > > I'm not sure -- do they have one? I can't seem to find it. > > Rich. > > > On Fri, Jan 13, 2023 at 8:30 AM Richard W.M. Jones > > wrote: > > > > > > On Fri, Jan 13, 2023 at 08:25:28AM -0700, alan somers wrote: > > > > IMHO this is a design bug in Debian. Sure, they need to create > > > > packages for any Rust crate that needs to install executable or .so > > > > files. But crates like nbdkit don't install anything. They're only > > > > used to build other Rust crates, and only used at compile time. They > > > > can simply be fetched during the package building process. I really > > > > don't know what Debian is doing by packaging this crate. Is it > > > > actually trying to install the ramdisk example? > > > > > > I'm not sure I understand - which crate? > > > > > > Rich. > > > > > > > On Fri, Jan 13, 2023 at 7:27 AM Richard W.M. Jones > > > > wrote: > > > > > > > > > > On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote: > > > > > > I think we should downgrade predicates-tree to 1.0.5 or older. I > > > > > > can > > > > > > submit a PR for that. What does "rustc --version" show you? > > > > > > > > > > Unfortunately our configure script doesn't collect that information > > > > > (it should do! - I'll fix that in a moment). > > > > > > > > > > But based on it being Debian 11 ("bullseye") it's likely to be: > > > > > > > > > > https://packages.debian.org/bullseye/rustc > > > > > Package: rustc (1.48.0+dfsg1-2) > > > > > > > > > > Which is pretty ancient ... > > > > > > > > > > Rich. > > > > > > > > > > > On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > > > > > > > > > > > -- > > > > > > > cargo build --release --example ramdisk > > > > > > > Downloading crates ... > > > > > > > Downloaded float-cmp v0.9.0 > > > > > > > Downloaded downcast v0.11.0 > > > > > > > Downloaded mockall_derive v0.11.3 > > > > > > > Downloaded itertools v0.10.5 > > > > > > > Downloaded aho-corasick v0.7.20 > > > > > > > Downloaded predicates-tree v1.0.7 > > > > > > > error: failed to parse manifest at > > > > > > > `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > > > > > > > Caused by: > > > > > > > failed to parse the `edition` key > > > > > > > Caused by: > > > > > > > this version of Cargo is older than the `2021` edition, and > > > > > > > only supports `2015` and `2018` editions. > > > > > > > -- > > > > > > > > > > > > > > nbdkit itself uses edition = 2018, but this seems to affects one > > > > > > > of > > > > > > > the dependencies. > > > > > > > > > > > > > > I'm not sure how to solve this, but one ideas I had is in > > > > > > > ./configure > > > > > > > to check if the cargo/rust we're trying to use doesn't support > > > > > > > some > > > > > > > base edition (eg. latest edition supported < 2021) then we would > > > > > > > disable rust bindings. > > > > > > > > > > > > > > Unfortunately actually getting the latest supported edition seems > > > > > > > hard. The best I could find is parsing this which doesn't seem > > > > > > > ideal: > > > > > > > > > > > > > > $ rustc --help |& grep -- --edition > > > > > > > --edition 2015|2018|2021|2024 > > > > > > > > > > > > > > What do you think? > > > > > > > > > > > > > > Rich. > > > > > > > > > > > > > > -- > > > > > > > Richard Jones, Virtualization Group, Red Hat > > > > > > > http://people.redhat.com/~rjones > > > > > > > Read my programming and virtualization blog: > > > > > > > http://rwmj.wordpress.com > > > > > > > libguestfs lets you edit virtual machines. Supports shell > > > > > > > scripting, > > > > > > > bindings from many languages. http://libguestfs.org > > > > > > > > > > > > > > > > > -- > > > > > Richard Jones, Virtualization Group, Red Hat > > > > > http://people.redhat.com/~rjones > > > > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > > > > Fedora Windows cross-compiler. Compile Windows programs, test, and > > > > > build Windows installers. Over 100 libraries supported. > > > >
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 08:35:08AM -0700, alan somers wrote: > The nbdkit crate. Why does Debian need a package for it? I'm not sure -- do they have one? I can't seem to find it. Rich. > On Fri, Jan 13, 2023 at 8:30 AM Richard W.M. Jones wrote: > > > > On Fri, Jan 13, 2023 at 08:25:28AM -0700, alan somers wrote: > > > IMHO this is a design bug in Debian. Sure, they need to create > > > packages for any Rust crate that needs to install executable or .so > > > files. But crates like nbdkit don't install anything. They're only > > > used to build other Rust crates, and only used at compile time. They > > > can simply be fetched during the package building process. I really > > > don't know what Debian is doing by packaging this crate. Is it > > > actually trying to install the ramdisk example? > > > > I'm not sure I understand - which crate? > > > > Rich. > > > > > On Fri, Jan 13, 2023 at 7:27 AM Richard W.M. Jones > > > wrote: > > > > > > > > On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote: > > > > > I think we should downgrade predicates-tree to 1.0.5 or older. I can > > > > > submit a PR for that. What does "rustc --version" show you? > > > > > > > > Unfortunately our configure script doesn't collect that information > > > > (it should do! - I'll fix that in a moment). > > > > > > > > But based on it being Debian 11 ("bullseye") it's likely to be: > > > > > > > > https://packages.debian.org/bullseye/rustc > > > > Package: rustc (1.48.0+dfsg1-2) > > > > > > > > Which is pretty ancient ... > > > > > > > > Rich. > > > > > > > > > On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones > > > > > wrote: > > > > > > > > > > > > > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > > > > > > > > > -- > > > > > > cargo build --release --example ramdisk > > > > > > Downloading crates ... > > > > > > Downloaded float-cmp v0.9.0 > > > > > > Downloaded downcast v0.11.0 > > > > > > Downloaded mockall_derive v0.11.3 > > > > > > Downloaded itertools v0.10.5 > > > > > > Downloaded aho-corasick v0.7.20 > > > > > > Downloaded predicates-tree v1.0.7 > > > > > > error: failed to parse manifest at > > > > > > `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > > > > > > Caused by: > > > > > > failed to parse the `edition` key > > > > > > Caused by: > > > > > > this version of Cargo is older than the `2021` edition, and only > > > > > > supports `2015` and `2018` editions. > > > > > > -- > > > > > > > > > > > > nbdkit itself uses edition = 2018, but this seems to affects one of > > > > > > the dependencies. > > > > > > > > > > > > I'm not sure how to solve this, but one ideas I had is in > > > > > > ./configure > > > > > > to check if the cargo/rust we're trying to use doesn't support some > > > > > > base edition (eg. latest edition supported < 2021) then we would > > > > > > disable rust bindings. > > > > > > > > > > > > Unfortunately actually getting the latest supported edition seems > > > > > > hard. The best I could find is parsing this which doesn't seem > > > > > > ideal: > > > > > > > > > > > > $ rustc --help |& grep -- --edition > > > > > > --edition 2015|2018|2021|2024 > > > > > > > > > > > > What do you think? > > > > > > > > > > > > Rich. > > > > > > > > > > > > -- > > > > > > Richard Jones, Virtualization Group, Red Hat > > > > > > http://people.redhat.com/~rjones > > > > > > Read my programming and virtualization blog: > > > > > > http://rwmj.wordpress.com > > > > > > libguestfs lets you edit virtual machines. Supports shell > > > > > > scripting, > > > > > > bindings from many languages. http://libguestfs.org > > > > > > > > > > > > > > -- > > > > Richard Jones, Virtualization Group, Red Hat > > > > http://people.redhat.com/~rjones > > > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > > > Fedora Windows cross-compiler. Compile Windows programs, test, and > > > > build Windows installers. Over 100 libraries supported. > > > > http://fedoraproject.org/wiki/MinGW > > > > > > > > -- > > Richard Jones, Virtualization Group, Red Hat > > http://people.redhat.com/~rjones > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > Fedora Windows cross-compiler. Compile Windows programs, test, and > > build Windows installers. Over 100 libraries supported. > > http://fedoraproject.org/wiki/MinGW > > -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
The nbdkit crate. Why does Debian need a package for it? On Fri, Jan 13, 2023 at 8:30 AM Richard W.M. Jones wrote: > > On Fri, Jan 13, 2023 at 08:25:28AM -0700, alan somers wrote: > > IMHO this is a design bug in Debian. Sure, they need to create > > packages for any Rust crate that needs to install executable or .so > > files. But crates like nbdkit don't install anything. They're only > > used to build other Rust crates, and only used at compile time. They > > can simply be fetched during the package building process. I really > > don't know what Debian is doing by packaging this crate. Is it > > actually trying to install the ramdisk example? > > I'm not sure I understand - which crate? > > Rich. > > > On Fri, Jan 13, 2023 at 7:27 AM Richard W.M. Jones > > wrote: > > > > > > On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote: > > > > I think we should downgrade predicates-tree to 1.0.5 or older. I can > > > > submit a PR for that. What does "rustc --version" show you? > > > > > > Unfortunately our configure script doesn't collect that information > > > (it should do! - I'll fix that in a moment). > > > > > > But based on it being Debian 11 ("bullseye") it's likely to be: > > > > > > https://packages.debian.org/bullseye/rustc > > > Package: rustc (1.48.0+dfsg1-2) > > > > > > Which is pretty ancient ... > > > > > > Rich. > > > > > > > On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones > > > > wrote: > > > > > > > > > > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > > > > > > > -- > > > > > cargo build --release --example ramdisk > > > > > Downloading crates ... > > > > > Downloaded float-cmp v0.9.0 > > > > > Downloaded downcast v0.11.0 > > > > > Downloaded mockall_derive v0.11.3 > > > > > Downloaded itertools v0.10.5 > > > > > Downloaded aho-corasick v0.7.20 > > > > > Downloaded predicates-tree v1.0.7 > > > > > error: failed to parse manifest at > > > > > `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > > > > > Caused by: > > > > > failed to parse the `edition` key > > > > > Caused by: > > > > > this version of Cargo is older than the `2021` edition, and only > > > > > supports `2015` and `2018` editions. > > > > > -- > > > > > > > > > > nbdkit itself uses edition = 2018, but this seems to affects one of > > > > > the dependencies. > > > > > > > > > > I'm not sure how to solve this, but one ideas I had is in ./configure > > > > > to check if the cargo/rust we're trying to use doesn't support some > > > > > base edition (eg. latest edition supported < 2021) then we would > > > > > disable rust bindings. > > > > > > > > > > Unfortunately actually getting the latest supported edition seems > > > > > hard. The best I could find is parsing this which doesn't seem ideal: > > > > > > > > > > $ rustc --help |& grep -- --edition > > > > > --edition 2015|2018|2021|2024 > > > > > > > > > > What do you think? > > > > > > > > > > Rich. > > > > > > > > > > -- > > > > > Richard Jones, Virtualization Group, Red Hat > > > > > http://people.redhat.com/~rjones > > > > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > > > > libguestfs lets you edit virtual machines. Supports shell scripting, > > > > > bindings from many languages. http://libguestfs.org > > > > > > > > > > > -- > > > Richard Jones, Virtualization Group, Red Hat > > > http://people.redhat.com/~rjones > > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > > Fedora Windows cross-compiler. Compile Windows programs, test, and > > > build Windows installers. Over 100 libraries supported. > > > http://fedoraproject.org/wiki/MinGW > > > > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > Fedora Windows cross-compiler. Compile Windows programs, test, and > build Windows installers. Over 100 libraries supported. > http://fedoraproject.org/wiki/MinGW > ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 08:25:28AM -0700, alan somers wrote: > IMHO this is a design bug in Debian. Sure, they need to create > packages for any Rust crate that needs to install executable or .so > files. But crates like nbdkit don't install anything. They're only > used to build other Rust crates, and only used at compile time. They > can simply be fetched during the package building process. I really > don't know what Debian is doing by packaging this crate. Is it > actually trying to install the ramdisk example? I'm not sure I understand - which crate? Rich. > On Fri, Jan 13, 2023 at 7:27 AM Richard W.M. Jones wrote: > > > > On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote: > > > I think we should downgrade predicates-tree to 1.0.5 or older. I can > > > submit a PR for that. What does "rustc --version" show you? > > > > Unfortunately our configure script doesn't collect that information > > (it should do! - I'll fix that in a moment). > > > > But based on it being Debian 11 ("bullseye") it's likely to be: > > > > https://packages.debian.org/bullseye/rustc > > Package: rustc (1.48.0+dfsg1-2) > > > > Which is pretty ancient ... > > > > Rich. > > > > > On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones > > > wrote: > > > > > > > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > > > > > -- > > > > cargo build --release --example ramdisk > > > > Downloading crates ... > > > > Downloaded float-cmp v0.9.0 > > > > Downloaded downcast v0.11.0 > > > > Downloaded mockall_derive v0.11.3 > > > > Downloaded itertools v0.10.5 > > > > Downloaded aho-corasick v0.7.20 > > > > Downloaded predicates-tree v1.0.7 > > > > error: failed to parse manifest at > > > > `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > > > > Caused by: > > > > failed to parse the `edition` key > > > > Caused by: > > > > this version of Cargo is older than the `2021` edition, and only > > > > supports `2015` and `2018` editions. > > > > -- > > > > > > > > nbdkit itself uses edition = 2018, but this seems to affects one of > > > > the dependencies. > > > > > > > > I'm not sure how to solve this, but one ideas I had is in ./configure > > > > to check if the cargo/rust we're trying to use doesn't support some > > > > base edition (eg. latest edition supported < 2021) then we would > > > > disable rust bindings. > > > > > > > > Unfortunately actually getting the latest supported edition seems > > > > hard. The best I could find is parsing this which doesn't seem ideal: > > > > > > > > $ rustc --help |& grep -- --edition > > > > --edition 2015|2018|2021|2024 > > > > > > > > What do you think? > > > > > > > > Rich. > > > > > > > > -- > > > > Richard Jones, Virtualization Group, Red Hat > > > > http://people.redhat.com/~rjones > > > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > > > libguestfs lets you edit virtual machines. Supports shell scripting, > > > > bindings from many languages. http://libguestfs.org > > > > > > > > -- > > Richard Jones, Virtualization Group, Red Hat > > http://people.redhat.com/~rjones > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > Fedora Windows cross-compiler. Compile Windows programs, test, and > > build Windows installers. Over 100 libraries supported. > > http://fedoraproject.org/wiki/MinGW > > -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
IMHO this is a design bug in Debian. Sure, they need to create packages for any Rust crate that needs to install executable or .so files. But crates like nbdkit don't install anything. They're only used to build other Rust crates, and only used at compile time. They can simply be fetched during the package building process. I really don't know what Debian is doing by packaging this crate. Is it actually trying to install the ramdisk example? On Fri, Jan 13, 2023 at 7:27 AM Richard W.M. Jones wrote: > > On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote: > > I think we should downgrade predicates-tree to 1.0.5 or older. I can > > submit a PR for that. What does "rustc --version" show you? > > Unfortunately our configure script doesn't collect that information > (it should do! - I'll fix that in a moment). > > But based on it being Debian 11 ("bullseye") it's likely to be: > > https://packages.debian.org/bullseye/rustc > Package: rustc (1.48.0+dfsg1-2) > > Which is pretty ancient ... > > Rich. > > > On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones > > wrote: > > > > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > > > -- > > > cargo build --release --example ramdisk > > > Downloading crates ... > > > Downloaded float-cmp v0.9.0 > > > Downloaded downcast v0.11.0 > > > Downloaded mockall_derive v0.11.3 > > > Downloaded itertools v0.10.5 > > > Downloaded aho-corasick v0.7.20 > > > Downloaded predicates-tree v1.0.7 > > > error: failed to parse manifest at > > > `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > > > Caused by: > > > failed to parse the `edition` key > > > Caused by: > > > this version of Cargo is older than the `2021` edition, and only > > > supports `2015` and `2018` editions. > > > -- > > > > > > nbdkit itself uses edition = 2018, but this seems to affects one of > > > the dependencies. > > > > > > I'm not sure how to solve this, but one ideas I had is in ./configure > > > to check if the cargo/rust we're trying to use doesn't support some > > > base edition (eg. latest edition supported < 2021) then we would > > > disable rust bindings. > > > > > > Unfortunately actually getting the latest supported edition seems > > > hard. The best I could find is parsing this which doesn't seem ideal: > > > > > > $ rustc --help |& grep -- --edition > > > --edition 2015|2018|2021|2024 > > > > > > What do you think? > > > > > > Rich. > > > > > > -- > > > Richard Jones, Virtualization Group, Red Hat > > > http://people.redhat.com/~rjones > > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > > libguestfs lets you edit virtual machines. Supports shell scripting, > > > bindings from many languages. http://libguestfs.org > > > > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > Fedora Windows cross-compiler. Compile Windows programs, test, and > build Windows installers. Over 100 libraries supported. > http://fedoraproject.org/wiki/MinGW > ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
On Fri, Jan 13, 2023 at 07:17:14AM -0700, alan somers wrote: > I think we should downgrade predicates-tree to 1.0.5 or older. I can > submit a PR for that. What does "rustc --version" show you? Unfortunately our configure script doesn't collect that information (it should do! - I'll fix that in a moment). But based on it being Debian 11 ("bullseye") it's likely to be: https://packages.debian.org/bullseye/rustc Package: rustc (1.48.0+dfsg1-2) Which is pretty ancient ... Rich. > On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones wrote: > > > > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > > > -- > > cargo build --release --example ramdisk > > Downloading crates ... > > Downloaded float-cmp v0.9.0 > > Downloaded downcast v0.11.0 > > Downloaded mockall_derive v0.11.3 > > Downloaded itertools v0.10.5 > > Downloaded aho-corasick v0.7.20 > > Downloaded predicates-tree v1.0.7 > > error: failed to parse manifest at > > `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > > Caused by: > > failed to parse the `edition` key > > Caused by: > > this version of Cargo is older than the `2021` edition, and only supports > > `2015` and `2018` editions. > > -- > > > > nbdkit itself uses edition = 2018, but this seems to affects one of > > the dependencies. > > > > I'm not sure how to solve this, but one ideas I had is in ./configure > > to check if the cargo/rust we're trying to use doesn't support some > > base edition (eg. latest edition supported < 2021) then we would > > disable rust bindings. > > > > Unfortunately actually getting the latest supported edition seems > > hard. The best I could find is parsing this which doesn't seem ideal: > > > > $ rustc --help |& grep -- --edition > > --edition 2015|2018|2021|2024 > > > > What do you think? > > > > Rich. > > > > -- > > Richard Jones, Virtualization Group, Red Hat > > http://people.redhat.com/~rjones > > Read my programming and virtualization blog: http://rwmj.wordpress.com > > libguestfs lets you edit virtual machines. Supports shell scripting, > > bindings from many languages. http://libguestfs.org > > -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] Cargo edition problem with Debian 11
I think we should downgrade predicates-tree to 1.0.5 or older. I can submit a PR for that. What does "rustc --version" show you? On Fri, Jan 13, 2023 at 2:41 AM Richard W.M. Jones wrote: > > > https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 > > -- > cargo build --release --example ramdisk > Downloading crates ... > Downloaded float-cmp v0.9.0 > Downloaded downcast v0.11.0 > Downloaded mockall_derive v0.11.3 > Downloaded itertools v0.10.5 > Downloaded aho-corasick v0.7.20 > Downloaded predicates-tree v1.0.7 > error: failed to parse manifest at > `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` > Caused by: > failed to parse the `edition` key > Caused by: > this version of Cargo is older than the `2021` edition, and only supports > `2015` and `2018` editions. > -- > > nbdkit itself uses edition = 2018, but this seems to affects one of > the dependencies. > > I'm not sure how to solve this, but one ideas I had is in ./configure > to check if the cargo/rust we're trying to use doesn't support some > base edition (eg. latest edition supported < 2021) then we would > disable rust bindings. > > Unfortunately actually getting the latest supported edition seems > hard. The best I could find is parsing this which doesn't seem ideal: > > $ rustc --help |& grep -- --edition > --edition 2015|2018|2021|2024 > > What do you think? > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > Read my programming and virtualization blog: http://rwmj.wordpress.com > libguestfs lets you edit virtual machines. Supports shell scripting, > bindings from many languages. http://libguestfs.org > ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
[Libguestfs] Cargo edition problem with Debian 11
https://gitlab.com/nbdkit/nbdkit/-/jobs/3598390121 -- cargo build --release --example ramdisk Downloading crates ... Downloaded float-cmp v0.9.0 Downloaded downcast v0.11.0 Downloaded mockall_derive v0.11.3 Downloaded itertools v0.10.5 Downloaded aho-corasick v0.7.20 Downloaded predicates-tree v1.0.7 error: failed to parse manifest at `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/predicates-tree-1.0.7/Cargo.toml` Caused by: failed to parse the `edition` key Caused by: this version of Cargo is older than the `2021` edition, and only supports `2015` and `2018` editions. -- nbdkit itself uses edition = 2018, but this seems to affects one of the dependencies. I'm not sure how to solve this, but one ideas I had is in ./configure to check if the cargo/rust we're trying to use doesn't support some base edition (eg. latest edition supported < 2021) then we would disable rust bindings. Unfortunately actually getting the latest supported edition seems hard. The best I could find is parsing this which doesn't seem ideal: $ rustc --help |& grep -- --edition --edition 2015|2018|2021|2024 What do you think? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs