Re: Building "cargo-c": over 400 packages to be downloaded?

"Rainer Fiebig" ([email protected] via blfs-support Mailing List) <[email protected]> Fri, 13 Mar 2026 19:51:58 +0100
Newsgroups gmane.linux.lfs.beyond.support
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1773427933-1253-15320
Content-Type: text/plain; charset=utf-8
Content-Language: de
Content-Transfer-Encoding: 8bit

Am 12.03.26 um 21:43 schrieb Joe Locash ([email protected] via
blfs-support Mailing List):
> On 3/12/26 6:28 AM, Rainer Fiebig ([email protected] via blfs-support
> Mailing List) wrote:
>> "Cargo-c" is required for later versions of librsvg which I wanted to
>> update for security-reasons (SA 12.4 098).
>>
>> An offline-build of cargo-c doesn't seem possible and the download of
>> file "cargo.lock" is necessary.  I checked version -0.10.21 of that file
>> and it has over 400 "package" sections, all with name and url:
> 
> <snip>
> 
> You can do an offline build. On your system with internet access after
> you extract and cd into the cargo-c source dir, just do a "cargo vendor".
> 
> It will download all the crates it thinks it needs. Save the vendor dir
> and copy it to your offline box and put it into the cargo-c source dir
> there. Make sure to follow the directions that are displayed after doing
> the vendor. I do all of my builds offline.

Tested this with cargo-c-0.10.21 (and rustc-1,94.0) and it worked -
provided that "config.json" and "Cargo.lock" were also in the package's
root directory.

Contrary to the book, I downloaded Cargo.lock with a slightly modified
curl-statement

curl -fL
"https://github.com/lu-zero/cargo-c/releases/download/v0.10.21/Cargo.lock"
--output "Cargo.lock-0.10.21"

and then symlinked that now versioned file as "Cargo.lock" in the
package's root directory.  Helps me to keep track of things.

I think that - where possible - "cargo vendor" plus later offline-build
should be the preferred method for rust-based packages in BLFS for
several reasons:
- Obviously, an internet connection during the build would not be
  required.
- It increases transparancy (and perhaps control) as it allows the user
  to take a look at the vast amount of downloaded stuff _before_ the
  build starts instead of just having to blindly accept it.
- By copying directory "vendor" (and perhaps other needed files), the
  user creates a backup which can be reused if the build fails.  After
  all, users are admonished to start each build with a freshly unpacked
  source which otherwise would mean to repeat the whole downloading-act.
- It also may make the user aware that the often tiny download-size of
  the target-package is rather misleading and just the lesser part of
  the download-piper (40K vs. 518M for cargo-c-0.10.21).

Rainer


------------=_1773427933-1253-15320
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-support
Unsubscribe: See the above information page

------------=_1773427933-1253-15320--