From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05EB3C433EF for ; Wed, 8 Sep 2021 16:17:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3BA3461139 for ; Wed, 8 Sep 2021 16:17:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 3BA3461139 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:48754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO0GC-0003Lg-6L for qemu-devel@archiver.kernel.org; Wed, 08 Sep 2021 12:17:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44284) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO0ER-0001w2-5g for qemu-devel@nongnu.org; Wed, 08 Sep 2021 12:15:28 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:36674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mO0EM-0000tb-Vs for qemu-devel@nongnu.org; Wed, 08 Sep 2021 12:15:26 -0400 Received: by mail-wr1-x433.google.com with SMTP id g16so4149118wrb.3 for ; Wed, 08 Sep 2021 09:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MPGeft/XEGURbrh3KuR7T60ZfzBU74vEoJ4it6oxv/Y=; b=BN9btDZVzmKiwsaosI6gBHCWRSqT6X32Dsyxi5Q9bzIp7xP0Fql3OmhmKgxtRBZb0d fwqbpnladXwGykDbAvDEGOeruQTX7MGHEPAdTvYFPoNMaPwuFAEPTjGuvcUQuFa15imT yRooCC8WQVtkQz91Sz/HWmqbub14ny9z926ayyYK2FkaB6uyRh0h0B1aSBHxMqJ2AJOU gy5grq7fCOL/9GhP3flRMEgBlKQZqPnV2XjVAg4PBiTYMBuJvEKouqVuG1WoCzFaDh9D +QOe4xGc+0D+4+g/oFIKJU7q+ar1ww8Lvy+0I2B6G5J5xy6RtNKDhA4oddZkpjFxE3Nx K1NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MPGeft/XEGURbrh3KuR7T60ZfzBU74vEoJ4it6oxv/Y=; b=GQGDBVtEpW7Z3V1YmlQUwdCIeavnkk8jLybdOPfL02VOe5XRAFsopN9AOjlzhIoV5f PyCuOfuFK/tQksYvYCY1o4AnnOywOejJ2BegVN2npdu718S3DrgNwMF/CZkDAnhpTGBh qfit1iY3QBB5wAkr/BRLgDfD3AJjk7yA7BKGG6u9hbII2mR9N2nonBnv63zq39szJtn/ lRdgg/OqkCXSYtzzMldnk85cjJ7J4R4G6yTKC7TU8GKJEOMUBXJynx8px26OaYxejvQM NF/k0ISQds7Jdtv3PEuhvrlcz7qIdYyktdmaOXIpsLo56PpsALb8umqO5ZfoWg66LnRf Ylcw== X-Gm-Message-State: AOAM531q2KPRDmuyhbn3/WAhBcFVDImQ+BAStiMJ72esYQzogLfWiIbj yd+ajqrxzbH3sZ9EJJeRBWBFfqQFpeg/LYCbuVQ= X-Google-Smtp-Source: ABdhPJwFFntx905Tbq4hmSnWPCfwI0ZrZB9I3EbFQM02vatmzlWXroJHbocJLaNY68MYF/qhEIfT/uev80u84AQJ4hA= X-Received: by 2002:adf:ff8e:: with SMTP id j14mr4860829wrr.239.1631117721149; Wed, 08 Sep 2021 09:15:21 -0700 (PDT) MIME-Version: 1.0 References: <20210907121943.3498701-1-marcandre.lureau@redhat.com> <20210907121943.3498701-14-marcandre.lureau@redhat.com> <24888.55565.53378.616422@mariner.uk.xensource.com> <24888.56575.675507.669862@mariner.uk.xensource.com> In-Reply-To: <24888.56575.675507.669862@mariner.uk.xensource.com> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Wed, 8 Sep 2021 20:15:08 +0400 Message-ID: Subject: Re: [RFC v3 13/32] rust: use vendored-sources To: Ian Jackson Content-Type: multipart/alternative; boundary="0000000000005b272305cb7e30de" Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=marcandre.lureau@gmail.com; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , "Daniel P. Berrange" , QEMU , Stefan Hajnoczi , Markus Armbruster Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000005b272305cb7e30de Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Wed, Sep 8, 2021 at 7:55 PM Ian Jackson wrote: > Marc-Andr=C3=A9 Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sou= rces"): > > Hmm, I do "cargo vendor --versioned-dirs ../rust/vendored" to vendor > crates. > > > > It seems cc was updated, and I didn't update the submodule accordingly. > For > > reference, this is the dependency tree that WFM: > > git submodules are just awful IMO. > Yes, but it's often (always?) the user fault. CI should help, when it will check Rust code. > > $ cargo tree -p qga > > qga v0.1.0 (/home/elmarco/src/qemu/qga) > > =E2=94=9C=E2=94=80=E2=94=80 common v0.1.0 (/home/elmarco/src/qemu/rust/= common) > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101 > > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 nix v0.20.1 > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 bitflags v1.2.1 > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 cfg-if v1.0.0 > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101 > > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 memoffset v0.6.4 > > =E2=94=82 [build-dependencies] > > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 autocfg v1.0.1 > > =E2=94=9C=E2=94=80=E2=94=80 hostname v0.3.1 > > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101 > > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 match_cfg v0.1.0 > > =E2=94=94=E2=94=80=E2=94=80 nix v0.20.1 (*) > > With the .config/cargo.toml "replace-with" commented out, I see this: > > rustcargo@zealot:~/Rustup/Qemu/qemu.pwt/build$ cargo tree -p qga > qga v0.1.0 (/volatile/rustcargo/Rustup/Qemu/qemu.pwt/qga) > =E2=94=9C=E2=94=80=E2=94=80 common v0.1.0 (/volatile/rustcargo/Rustup/Qem= u/qemu.pwt/rust/common) > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101 > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 nix v0.20.1 > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 bitflags v1.2.1 > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 cfg-if v1.0.0 > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101 > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 memoffset v0.6.4 > =E2=94=82 [build-dependencies] > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 autocfg v1.0.1 > =E2=94=9C=E2=94=80=E2=94=80 hostname v0.3.1 > =E2=94=82 =E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101 > =E2=94=82 =E2=94=94=E2=94=80=E2=94=80 match_cfg v0.1.0 > =E2=94=94=E2=94=80=E2=94=80 nix v0.20.1 (*) > rustcargo@zealot:~/Rustup/Qemu/qemu.pwt/build$ > > Which is the same as yours. Although "cargo build" doesn't work > build, guessed from the messagese that perhaps this was the automatic > codegen hadn't run. I'm now trying "make" and and it seems to be > running. > > With the "replace-with" uncommented, cargo tree bombs out. I'm afraid > I haven't used cargo vendor so I'm not sure if I am going in the right > direction with this workaround. Hopefully it will finish the build. > > Would it be possible to have a configure option to use unvendored > upstream Rust libraries from crates.io ? > Not easily, but we could have a --disable-rust-offline configure option. Whether this is desirable, I am not sure. --=20 Marc-Andr=C3=A9 Lureau --0000000000005b272305cb7e30de Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Wed, Sep 8, 2021 at 7:55 PM Ian = Jackson <iwj@xenproject.org>= ; wrote:
Marc-An= dr=C3=A9 Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources= "):
> Hmm, I do "cargo vendor --versioned-dirs ../rust/vendored" t= o vendor crates.
>
> It seems cc was updated, and I didn't update the submodule accordi= ngly. For
> reference, this is the dependency tree that WFM:

git submodules are just awful IMO.

Yes,= but it's often (always?) the user fault. CI should help, when it will = check Rust code.


> $ cargo tree -p qga =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
> qga v0.1.0 (/home/elmarco/src/qemu/qga)
> =E2=94=9C=E2=94=80=E2=94=80 common v0.1.0 (/home/elmarco/src/qemu/rust= /common)
> =E2=94=82 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101
> =E2=94=82 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 nix v0.20.1
> =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 bitflags v1= .2.1
> =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 cfg-if v1.0= .0
> =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 libc v0.2.1= 01
> =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 memoffset v= 0.6.4
> =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [build-dependencies]
> =E2=94=82 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =E2=94=94=E2=94=80=E2=94= =80 autocfg v1.0.1
> =E2=94=9C=E2=94=80=E2=94=80 hostname v0.3.1
> =E2=94=82 =C2=A0 =E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101
> =E2=94=82 =C2=A0 =E2=94=94=E2=94=80=E2=94=80 match_cfg v0.1.0
> =E2=94=94=E2=94=80=E2=94=80 nix v0.20.1 (*)

With the .config/cargo.toml "replace-with" commented out, I see t= his:

rustcargo@zealot:~/Rustup/Qemu/qemu.pwt/build$ cargo tree -p qga
qga v0.1.0 (/volatile/rustcargo/Rustup/Qemu/qemu.pwt/qga)
=E2=94=9C=E2=94=80=E2=94=80 common v0.1.0 (/volatile/rustcargo/Rustup/Qemu/= qemu.pwt/rust/common)
=E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101
=E2=94=82=C2=A0 =C2=A0=E2=94=94=E2=94=80=E2=94=80 nix v0.20.1
=E2=94=82=C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 bitflags v1= .2.1
=E2=94=82=C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 cfg-if v1.0= .0
=E2=94=82=C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 libc v0.2.1= 01
=E2=94=82=C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=94=E2=94=80=E2=94=80 memoffset v= 0.6.4
=E2=94=82=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[build-dependencies]
=E2=94=82=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=E2=94=94=E2=94=80=E2=94= =80 autocfg v1.0.1
=E2=94=9C=E2=94=80=E2=94=80 hostname v0.3.1
=E2=94=82=C2=A0 =C2=A0=E2=94=9C=E2=94=80=E2=94=80 libc v0.2.101
=E2=94=82=C2=A0 =C2=A0=E2=94=94=E2=94=80=E2=94=80 match_cfg v0.1.0
=E2=94=94=E2=94=80=E2=94=80 nix v0.20.1 (*)
rustcargo@zealot:~/Rustup/Qemu/qemu.pwt/build$

Which is the same as yours.=C2=A0 Although "cargo build" doesn= 9;t work
build, guessed from the messagese that perhaps this was the automatic
codegen hadn't run.=C2=A0 I'm now trying "make" and and i= t seems to be
running.

With the "replace-with" uncommented, cargo tree bombs out.=C2=A0 = I'm afraid
I haven't used cargo vendor so I'm not sure if I am going in the ri= ght
direction with this workaround.=C2=A0 Hopefully it will finish the build.
Would it be possible to have a configure option to use unvendored
upstream Rust libraries from crates.io ?

Not= easily, but we could have a --disable-rust-offline configure option. Wheth= er this is desirable, I am not sure.


-= -
Marc-Andr=C3=A9 Lureau
=
--0000000000005b272305cb7e30de--