Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Sep 2022 12:20:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        doc@FreeBSD.org
Subject:   [Bug 266571] Porter's Handbook: Using cargo: Use Makefile.crates instead of Makefile's CARGO_CRATES
Message-ID:  <bug-266571-9-xfHdTa0qYd@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-266571-9@https.bugs.freebsd.org/bugzilla/>
References:  <bug-266571-9@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266571

--- Comment #2 from Tobias Kortkamp <tobik@freebsd.org> ---
My 2 cents:

- Document Makefile.crates as a possible location but leave it up to
  the maintainer where to put CARGO_CRATES

- It should be documented explicitly that CARGO_CRATES in Makefile is fine
  too. Don't make this a review issue plz.

- Independent of where CARGO_CRATES is stored, updating it can be
  done automatically with cargo-crates-merge if portfmt is installed

I feel like you don't gain anything by declaring that CARGO_CRATES
must be in Makefile.crates instead of Makefile. What's needed is a
technical USES=3Dcargo change along the lines of either

- keep current approach but seed most of CARGO_CRATES from distinfo
  (since we currently have duplication of the same information for
  normal crates). Then most ports won't need to set CARGO_CRATES
  explicitly anywhere.

- properly hook crates to the dependency graph as build inputs (as
  ports that do not create packages to allow reuse of their WRKSRC in
  USES=3Dcargo via something like
  BUILD_DEPENDS=3Drust-crates.io-libc>0:devel/rust-crates.io-libc:patch).
  Basically adopt a similar approach like GNU Guix cargo-build-system
  with the extra bonus of removing most of the duplicated crate versions
  we currently have (how many libc crate version do we really need???) and
  will allow us to deal with the many vulnerable crates in the tree in a
  comprehensive way just like normal dependencies.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-266571-9-xfHdTa0qYd>