[Libguestfs] Cargo edition problem with Debian 11

alan somers asomers at gmail.com
Fri Jan 13 15:35:08 UTC 2023


The nbdkit crate.  Why does Debian need a package for it?

On Fri, Jan 13, 2023 at 8:30 AM Richard W.M. Jones <rjones at redhat.com> 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 <rjones at redhat.com> 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 <rjones at redhat.com> 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
>



More information about the Libguestfs mailing list